dscore  R Documentation 
The function dscore()
function estimates the Dscore,
a numeric score that measures child development, from PASS/FAIL
observations on milestones.
dscore( data, items = names(data), xname = "age", xunit = c("decimal", "days", "months"), key = NULL, itembank = dscore::builtin_itembank, metric = c("dscore", "logit"), prior_mean = NULL, prior_sd = NULL, transform = NULL, qp = 10:100, population = NULL, dec = c(2L, 3L), relevance = c(Inf, Inf) ) dscore_posterior( data, items = names(data), xname = "age", xunit = c("decimal", "days", "months"), key = NULL, itembank = dscore::builtin_itembank, metric = c("dscore", "logit"), prior_mean = NULL, prior_sd = NULL, transform = NULL, qp = 10:100, population = NULL, dec = c(2L, 3L), relevance = c(Inf, Inf) )
data 
A 
items 
A character vector containing names of items to be
included into the Dscore calculation. Milestone scores are coded
numerically as 
xname 
A string with the name of the age variable in

xunit 
A string specifying the unit in which age is measured
(either 
key 
A string that selects a subset in the itembank that
makes up the key, the set of difficulty
estimates from a fitted Rasch model.
The builtin keys are: 
itembank 
A 
metric 
A string, either 
prior_mean 
A string specifying where the mean of the
prior for the Dscore calculation should come from. It could be
a column name in 
prior_sd 
A string specifying a column name in 
transform 
Vector of length 2, signalling the intercept
and slope respectively of the linear transform that converts an
observation in the logit scale to the the Dscore scale. Only
needed if 
qp 
Numeric vector of equally spaced quadrature points.
This vector should span the range of all Dscore values. The default
( 
population 
A string describing the population. Currently
supported are 
dec 
A vector of two integers specifying the number of
decimals for rounding the Dscore and DAZ, respectively.
The default is 
relevance 
A numeric vector of length with the lower and
upper bounds of the relevance interval. The procedure calculates
a dynamic EAP for each item. If the difficulty level (tau) of the
next item is outside the relevance interval around EAP, the procedure
ignore the score on the item. The default is 
The algorithm is based on the method by Bock and Mislevy (1982). The method uses Bayes rule to update a prior ability into a posterior ability.
The item names should correspond to the "gsed"
lexicon.
A key is defined by the set of estimated item difficulties.
Key  Model  Quadrature  Instruments  Direct/Caregiver  Reference 
"dutch"  75_0  10:80  1  direct  Van Buuren, 2014/2020 
"gcdg"  565_18  10:100  14  direct  Weber, 2019 
"gsed1912"  807_17  10:100  20  mixed  GSED Team, 2019 
"gsed2206"  818_17  10:100  22  mixed  GSED Team, 2022 
"gsed2208"  818_6  10:100  22  mixed  GSED Team, 2022 
"gsed2212"  818_6  10:100  22  mixed  GSED Team, 2022 
"lf2206"  155_0  10:100  1  direct  GSED Team, 2022 
"sf2206"  139_0  10:100  1  caregiver  GSED Team, 2022 
As a general rule, one should only compare Dscores
that are calculated using the same key and the same
set of quadrature points. For calculating Dscores on new data,
the advice is to use the default, which currently links to
"gsed2212"
.
The default starting prior is a mean calculated from a socalled
"Count model" that describes mean Dscore as a function of age. The
Count models are stored as internal functions
dscore:::count_mu_phase1()
, dscore:::count_mu_gcdg()
and
dscore:::count_mu_dutch()
. The spread of the starting prior
is 5 Dscore points around this mean Dscore, which corresponds to
approximately 1.5 to 2 times the normal spread of child of a given age. The
starting prior is thus somewhat informative for low numbers of
valid items, and uninformative for large number of items (say >10 items).
The dscore()
function returns a data.frame
with
nrow(data)
rows and the following columns:
Name  Label 
a  Decimal age 
n  Number of items with valid (0/1) data 
p  Percentage of passed milestones 
d  Ability estimate, mean of posterior 
sem  Standard error of measurement, standard deviation of the posterior 
daz  Dscore corrected for age, calculated in Zscale 
The dscore_posterior()
function returns a numeric matrix with
nrow(data)
rows and length(qp)
columns with the
density at each quadrature point. The vector represents the full
posterior ability distribution. If no valid responses were obtained,
dscore_posterior()
returns the prior.
Stef van Buuren, Iris Eekhout, Arjan Huizing (2022)
Bock DD, Mislevy RJ (1982). Adaptive EAP Estimation of Ability in a Microcomputer Environment. Applied Psychological Measurement, 6(4), 431444.
Van Buuren S (2014). Growth charts of human development. Stat Methods Med Res, 23(4), 346368. https://stefvanbuuren.name/publication/vanbuuren2014gc/
Weber AM, RubioCodina M, Walker SP, van Buuren S, Eekhout I, GranthamMcGregor S, Caridad Araujo M, Chang SM, Fernald LCH, Hamadani JD, Hanlon A, Karam SM, Lozoff B, Ratsifandrihamanana L, Richter L, Black MM (2019). The Dscore: 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
get_tau()
,
builtin_itembank()
, posterior()
,
builtin_references()
data < data.frame( age = rep(round(21 / 365.25, 4), 10), ddifmd001 = c(NA, NA, 0, 0, 0, 1, 0, 1, 1, 1), ddicmm029 = c(NA, NA, NA, 0, 1, 0, 1, 0, 1, 1), ddigmd053 = c(NA, 0, 0, 1, 0, 0, 1, 1, 0, 1) ) items < names(data)[2:4] # third item is not part of default key get_tau(items) # calculate Dscore dscore(data) # calculate full posterior p < dscore_posterior(data) # plot posterior for row 7 plot(x = 10:100, y = p[7, ], type = "l", xlab = "Dscore", ylab = "Density", xlim = c(0, 30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.