The get_reference() function selects the D-score reference distribution.

get_reference(
  population = NULL,
  key = NULL,
  references = dscore::builtin_references,
  verbose = FALSE,
  ...
)

Arguments

population

String. The name of the reference population to calculate DAZ. Use with(builtin_references, table(key, population)) to see which built-in references are available for key - population combinations. If not specified, the function set the default population as builtin_keys$base_population[key == builtin_keys$key].

key

String. They key identifies 1) the difficulty estimates pertaining to a particular Rasch model, and 2) the prior mean and standard deviation of the prior distribution for calculating the D-score. The default key NULL sets key = "gsed2406". View builtin_keys for an overview of the available keys.

references

A data.frame with the same structure as builtin_references. The default is to use builtin_references.

verbose

Logical. Print settings.

...

Used to test whether the call contained the deprecated argument references.

Value

A data.frame with the LMS reference values.

Note

No references for population "gsed" exist. The function will silently rewrite population = "gsed" into to the population = "gsed".

The "dutch" reference was published in Van Buuren (2014) The "gcdg" was calculated from 15 cohorts with direct observations (Weber, 2019). The "phase1" references were calculated from the GSED Phase 1 validation data (GSED-BGD, GSED-PAK, GSED-TZA) cover age range 2w-3.5 years. The age range 3.5-5 yrs is linearly extrapolated and are only indicative. The "preliminary_standards" references were calculated from the GSED Phase 1 validation using a subset of children with healthy development.

References

Van Buuren S (2014). Growth charts of human development. Stat Methods Med Res, 23(4), 346-368.

Weber AM, Rubio-Codina M, Walker SP, van Buuren S, Eekhout I, Grantham-McGregor S, Caridad Araujo M, Chang SM, Fernald LCH, Hamadani JD, Hanlon A, Karam SM, Lozoff B, Ratsifandrihamanana L, Richter L, Black MM (2019). The D-score: a metric for interpreting the early development of infants and toddlers across global settings. BMJ Global Health, BMJ Global Health 4: e001724. https://gh.bmj.com/content/bmjgh/4/6/e001724.full.pdf.

Examples

# see key-population combinations of builtin_references
table(builtin_references$key, builtin_references$population)
#>           
#>            dutch gcdg phase1 preliminary_standards who_descriptive
#>   293_0        0    0    186                     0               0
#>   dutch      144    0      0                     0               0
#>   gcdg         0  121      0                     0               0
#>   gsed1912     0  121      0                     0               0
#>   gsed2212   185    0    186                     0               0
#>   gsed2406   185    0    186                   186               0
#>   gsed2510   185    0      0                   186             188

# get the default reference
reftab <- get_reference()
head(reftab, 2)
#>                 population      key distribution    age    mu  sigma   nu
#> 1501 preliminary_standards gsed2510          BCT 0.0000 11.46 0.2075 1.42
#> 1502 preliminary_standards gsed2510          BCT 0.0383 13.18 0.2075 1.42
#>         tau       P3      P10       P25      P50      P75      P90      P97
#> 1501 34.189 6.333258 8.150177  9.791339 11.46264 13.03831 14.41592 15.76832
#> 1502 34.189 7.283800 9.373415 11.260895 13.18304 14.99519 16.57957 18.13494
#>          SDM2     SDM1      SD0     SDP1     SDP2
#> 1501 5.941355  8.93160 11.46264 13.77963 16.03876
#> 1502 6.833076 10.27212 13.18304 15.84778 18.44597

# get the default reference for the key "gsed2212"
reftab <- get_reference(key = "gsed2212", verbose = TRUE)
#> key:         gsed2212 
#> population:  phase1 

# get dutch reference for default key
reftab <- get_reference(population = "dutch", verbose = TRUE)
#> key:         gsed2510 
#> population:  dutch 

# loading a non-existing reference yields zero rows
reftab <- get_reference(population = "france", verbose = TRUE)
#> key:         gsed2510 
#> population:  france 
#> Warning: Reference 'france' for key 'gsed2510' not found. Fallback: 'preliminary_standards'
nrow(reftab)
#> [1] 186