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 = "gsed",
itembank = dscore::builtin_itembank,
population = key,
xunit = c("decimal", "days", "months"),
dec = 3L
)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).
A string that sets the key, the set of difficulty
estimates from a fitted Rasch model.
The built-in keys are: "gsed" (default), "gcdg",
and "dutch".
A data.frame with columns named key, item
and tau. The function uses dscore::builtin_itembank by
default.
A string describing the population. Currently
supported are "dutch" and "gcdg" (default).
A string specifying the unit in which age is measured
(either "decimal", "days" or "months").
The default ("decimal") means decimal age in years.
Integer specifying the number of decimals for
rounding the ability estimates and the DAZ. The default is
dec = 3.
Tibble with four columns: item, d (D-score),
pct (percentile), and a (age-equivalent, in xunit units).
# NOT RUN {
get_age_equivalent(c("ddicmm030", "ddicmm050"), key = "dutch")
# }
Run the code above in your browser using DataLab