Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

poly2dich

Change polytomous items to dichotomous item format


Description

Transforms a matrix of items into a new matrix where the select polytomous items have been converted into comparable dichotomous items with the same information.

Usage

poly2dich(data, which.items = 1:ncol(data))

Arguments

data

an object of class data.frame or matrix

which.items

a vector indicating which items should be transformed into the dichotomous form. Default uses all input items

Value

Returns an integer matrix

Author(s)

References

Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. doi: 10.18637/jss.v048.i06

Examples

## Not run: 
data(Science)

head(Science)
newScience <- poly2dich(Science)
head(newScience)

newScience2 <- poly2dich(Science, which.items = 2)
head(newScience2)


## End(Not run)

mirt

Multidimensional Item Response Theory

v1.33.2
GPL (>= 3)
Authors
Phil Chalmers [aut, cre] (<https://orcid.org/0000-0001-5332-2810>), Joshua Pritikin [ctb], Alexander Robitzsch [ctb], Mateusz Zoltak [ctb], KwonHyun Kim [ctb], Carl F. Falk [ctb], Adam Meade [ctb], Lennart Schneider [ctb], David King [ctb], Chen-Wei Liu [ctb], Ogreden Oguzhan [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.