ird-class: An S4 class to represent raw individual response data

Description Details Slots Author(s) Examples

Description

The ird class stores raw individual milestone 0/1/M+/M- data.

Details

Conversion of currently only one-way, from mst to bds.

Slots

mst

A numeric matrix or a data.frame with milestone responses data. There should be a variable with decimal age named "age" (or optionally a different name defined by xname). The remaining columns may contain 0 (fail), 1 (pass), 2 (M+), 3 (M-) or NA responses on milestones.

map

A data frame with two columns that maps column names in mst into bds numbers. The first column is a character vector with names in mst (do not include the age variable), the second is an integer vector with the BDS number.

bds

A calculated data frame containing age plus the mapped variables from mst. Values are coded into the BDS-codes: 1 (pass), 2 (fail, M-), 3 (M+). If not specified, the bds slot is converted from mst and map.

xname

Name of the age variable

instrument

A 3-letter code identifying the measurement instrument, for example, instrument = "ddi".

Author(s)

Stef van Buuren 2020

Examples

1
2
3
4
5
6
7
8
9
data <- data.frame(age = c(0.0821, 0.159, 0.255),
                   k1430 = c(1, NA, NA),
                   k1431 = c(2, NA, NA),
                   k1437 = c(3, 1, 1),
                   k1438 = c(0, 1, 1),
                   k1439 = c(0, 1, 1))
map <- data.frame(from = c("k1430", "k1431", "k1437", "k1438", "k1439"),
                  to = c(879, 927, 928, 881, 883))
new("ird", mst = data, map = map)

stefvanbuuren/minihealth documentation built on March 11, 2021, 7:10 p.m.