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
#>   293_0        0    0    186                     0
#>   dutch      144    0      0                     0
#>   gcdg         0  121      0                     0
#>   gsed1912     0  121      0                     0
#>   gsed2212   185    0    186                     0
#>   gsed2406   185    0    186                   185

# get the default reference
reftab <- get_reference()
head(reftab, 2)
#>                population      key distribution    age    mu  sigma    nu
#> 944 preliminary_standards gsed2406          BCT 0.0383 13.18 0.2075 1.420
#> 945 preliminary_standards gsed2406          BCT 0.0575 14.04 0.2001 1.426
#>        tau       P3       P10      P25      P50      P75      P90      P97
#> 944 34.189 7.283800  9.373415 11.26089 13.18304 14.99519 16.57957 18.13494
#> 945 34.121 7.991835 10.132744 12.06843 14.04231 15.90526 17.53530 19.13639
#>         SDM2     SDM1      SD0     SDP1     SDP2
#> 944 6.833076 10.27212 13.18304 15.84778 18.44597
#> 945 7.529790 11.05407 14.04231 16.78229 19.45665

# 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:         gsed2406 
#> population:  dutch 

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