# NOT RUN {
## a mixed-item format test form
## with five dichotomous and two polytomous items
# create a list containing the dichotomous item parameters
par.dc <- list(a=c(1.1, 1.2, 0.9, 1.8, 1.4),
b=c(0.1, -1.6, -0.2, 1.0, 1.2),
g=rep(0.2, 5))
# create a list containing the polytomous item parameters
par.py <- list(a=c(1.4, 0.6),
d=list(c(0.0, -1.9, 1.2), c(0.4, -1.1, 1.5, 0.2)))
# create a numeric vector of score categories for the items
cats <- c(2, 4, 2, 2, 5, 2, 2)
# create a character vector of IRT models for the items
model <- c("DRM", "GRM", "DRM", "DRM", "GPCM", "DRM", "DRM")
# create an item meta set
shape_df(par.dc=par.dc, par.py=par.py, cats=cats, model=model)
## an empty item meta with five dichotomous and two polytomous items
# create a numeric vector of score categories for the items
cats <- c(2, 4, 3, 2, 5, 2, 2)
# create a character vector of IRT models for the items
model <- c("1PLM", "GRM", "GRM", "2PLM", "GPCM", "DRM", "3PLM")
# create an empty item meta set
shape_df(cats=cats, model=model, empty.par=TRUE)
## an item meta for a single-item format test form with five dichotomous
shape_df(par.dc=par.dc, cats=rep(2, 5), model="DRM")
# }
Run the code above in your browser using DataLab