This function calculates the ages at which a certain percent in the reference population passes the items.
get_age_equivalent(
items,
pct = c(10, 50, 90),
key = NULL,
population = NULL,
transform = NULL,
itembank = dscore::builtin_itembank,
xunit = c("decimal", "days", "months"),
verbose = FALSE
)
data.frame
with four columns: item
, d
(D-score),
pct
(percentile), and a
(age-equivalent, in xunit
units).
A character vector containing names of items to be
included into the D-score calculation. Milestone scores are coded
numerically as 1
(pass) and 0
(fail). By default,
D-score calculation is done on all items found in the data
that have a difficulty parameter under the specified key
.
Numeric vector with requested percentiles (0-100). The
default is pct = c(10, 50, 90)
.
String. Name of the key that bundles the difficulty estimates
pertaining one the same Rasch model. View builtin_keys
for an overview
of the available keys.
String. The name of the reference population to calculate DAZ.
Use unique(builtin_references$population)
to obtain the set of currently
available reference populations.
Numeric vector, length 2, containing the intercept
and slope of the linear transform from the logit scale into the
the D-score scale. The default (NULL
) searches builtin_keys
for intercept and slope values.
A data.frame
with at least two columns
named item
and tau
. By default, the function uses
dscore::builtin_itembank
. If you specify your own itembank
,
then you should also provide the relevant transform
and qp
arguments.
A string specifying the unit in which age is measured
(either "decimal"
, "days"
or "months"
).
The default "decimal"
corresponds to decimal age in years.
Logical. Print settings.
get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"))
Run the code above in your browser using DataLab