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

View source: R/get_age_equivalent.R

get_age_equivalentR Documentation

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 = NULL,
  itembank = dscore::builtin_itembank,
  population = NULL,
  xunit = c("decimal", "days", "months")
)

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 selects a subset in the itembank that makes up the key, the set of difficulty estimates from a fitted Rasch model. The built-in keys are: "gsed2212" (default), "gsed2208" (deprecated), "gsed2206" (deprecated), "gsed1912", "lf2206", "sf2206", "gcdg", and "dutch". Since version 1.5.0, the key = "gsed" selects the latest key starting with the string "gsed". Use key = "" to use all item names, which should only be done if there are no duplicate itemnames in the itembank.

itembank

A data.frame with columns key, item, tau, instrument, domain, mode, number and label. Only columns item and tau are required. The function uses dscore::builtin_itembank by default.

population

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

xunit

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

Details

The function internally defines a scale factor given the key.

Value

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

Examples

get_age_equivalent(c("gpagmc018", "gtogmd026", "ddicmm050"))

dscore documentation built on Jan. 22, 2023, 1:50 a.m.