Skip to content

Continuous composites

Continuous composites are those composites which can be turned into a numeric score using some scoring algorithm.

Some functions like score are only defined for continuous composites. If you are not sure if a composite is continuous, you can always run:

julia
using RheumaComposites
SDAI <: ContinuousComposite
true

Scoring

Being able to calculate a numeric score is what sets continuous composite apart from Boolean composites. The score calculated this way is what will allow us to categorise the patient's disease activity or check whether they are in remission.

julia
using Unitful
sdai = SDAI(sjc=3, tjc=4, pga=3.4u"cm", ega=2.8u"cm", crp=21u"mg/dL")
score(sdai)
34.2

Categorisation

For all continuous composites included in RheumaComposites, cutoffs have been defined to categorise the numeric scores into discrete disease activity categories:

Disease activityDAS28ESRDAS28CRPSDAICDAIDAPSABASDAI
Remission< 2.6< 2.4 3.3 2.8 4.0 4.0
Low 3.2 2.9 11.0 10.0 14.0-
Moderate 5.1 4.6 26.0 22.0 28.0-
High> 5.1> 4.6> 26.0> 22.0> 28.0-

To determine the disease activity category of a patient's continuous composite, use categorise

julia
categorise(sdai)
"high"

Since disease remission is typically of most interest, isremission allows you to check this directly.

julia
isremission(sdai)
false

Decomposition

Several configurations of component variables can lead to the same composite score. Therefore, it can be of interest to understand how configurations compare between patients within or across different disease activity groups.

The decompose function shows you by how much each component contributes to the final score. The values are fractions and will therefore add to 1.

julia
decompose(sdai)
Dict{Symbol, Float64} with 5 entries:
  :tjc => 0.117
  :ega => 0.082
  :sjc => 0.088
  :pga => 0.099
  :crp => 0.614

Furthermore, it is possible to group component variables into different groups, resulting in what I named faceted composites. This grouping will then be reflected by the fractions calculated by decompose.

julia
facets = (subjective = [:tjc, :sjc, :pga], objective = [:ega, :crp])
faceted_sdai = faceted(sdai, facets)
Faceted
  ROOT: SDAI composite
  FACETS: (subjective = [:tjc, :sjc, :pga], objective = [:ega, :crp])

Using decompose on this modified SDAI composite will tell us to what degree subjective and objective variables contributed to the score.

julia
decompose(faceted_sdai)
Dict{Symbol, Float64} with 2 entries:
  :subjective => 0.304
  :objective  => 0.696

This page was generated using Literate.jl.