Learn R Programming

dscore (version 1.0.0)

get_age_equivalent: Get age equivalents of items that have a difficulty estimate

Description

This function calculates the ages at which a certain percent in the reference population passes the items.

Usage

get_age_equivalent(
  items,
  pct = c(10, 50, 90),
  key = "gsed",
  itembank = dscore::builtin_itembank,
  population = key,
  xunit = c("decimal", "days", "months"),
  dec = 3L
)

Arguments

items

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.

pct

Numeric vector with requested percentiles (0-100). The default is pct = c(10, 50, 90).

key

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".

itembank

A data.frame with columns named key, item and tau. The function uses dscore::builtin_itembank by default.

population

A string describing the population. Currently supported are "dutch" and "gcdg" (default).

xunit

A string specifying the unit in which age is measured (either "decimal", "days" or "months"). The default ("decimal") means decimal age in years.

dec

Integer specifying the number of decimals for rounding the ability estimates and the DAZ. The default is dec = 3.

Value

Tibble with four columns: item, d (D-score), pct (percentile), and a (age-equivalent, in xunit units).

Examples

Run this code
# NOT RUN {
get_age_equivalent(c("ddicmm030", "ddicmm050"), key = "dutch")
# }

Run the code above in your browser using DataLab