Learn R Programming

CDM (version 4.991-1)

data.cdm: Several Datasets for the CDM Package

Description

Several datasets for the CDM package

Usage

data(data.cdm01) data(data.cdm02) data(data.cdm03)

Arguments

Format

  • Dataset data.cdm01 This dataset is a multiple choice dataset and used in the mcdina function. The format is: List of 3 $ data :'data.frame': ..$ I1 : int [1:5003] 3 3 4 1 1 1 1 1 1 1 ... ..$ I2 : int [1:5003] 1 1 3 1 1 2 1 1 2 1 ... ..$ I3 : int [1:5003] 4 3 2 3 2 2 2 2 1 2 ... ..$ I4 : int [1:5003] 3 3 3 2 2 2 2 3 3 1 ... ..$ I5 : int [1:5003] 2 2 2 3 1 1 2 3 2 1 ... ..$ I6 : int [1:5003] 3 1 1 1 1 2 1 1 1 1 ... ..$ I7 : int [1:5003] 1 1 2 2 1 3 1 1 1 3 ... ..$ I8 : int [1:5003] 1 1 1 1 1 2 1 4 3 3 ... ..$ I9 : int [1:5003] 3 2 1 1 1 1 3 3 1 3 ... ..$ I10: int [1:5003] 2 1 2 1 1 2 2 2 2 1 ... ..$ I11: int [1:5003] 2 2 2 2 1 2 1 2 1 1 ... ..$ I12: int [1:5003] 1 2 1 1 2 1 1 1 1 2 ... ..$ I13: int [1:5003] 2 1 1 1 2 1 2 2 1 1 ... ..$ I14: int [1:5003] 1 1 1 1 1 2 1 1 2 1 ... ..$ I15: int [1:5003] 1 2 1 1 1 1 1 1 1 1 ... ..$ I16: int [1:5003] 1 2 2 1 2 2 2 1 1 1 ... ..$ I17: int [1:5003] 1 1 1 1 1 1 1 1 1 1 ... $ group : int [1:5003] 1 1 1 1 1 1 1 1 1 1 ... $ q.matrix:'data.frame': ..$ item : int [1:52] 1 1 1 1 2 2 2 2 3 3 ... ..$ categ: int [1:52] 1 2 3 4 1 2 3 4 1 2 ... ..$ A1 : int [1:52] 0 1 0 1 0 1 1 1 0 0 ... ..$ A2 : int [1:52] 0 0 1 1 0 0 0 1 0 0 ... ..$ A3 : int [1:52] 0 0 0 0 0 0 0 0 0 0 ...
  • Dataset data.cdm02 Multiple choice dataset with a Q-matrix designed for polytomous attributes. List of 2 $ data :'data.frame': ..$ I1 : int [1:3000] 3 3 4 1 1 1 1 1 1 1 ... ..$ I2 : int [1:3000] 1 1 3 1 1 2 1 1 2 1 ... ..$ I3 : int [1:3000] 4 3 2 3 2 2 2 2 1 2 ... [...] ..$ B17: num [1:3000] 1 1 1 1 1 1 1 1 1 1 ... ..$ B18: num [1:3000] 1 1 1 1 2 2 2 2 2 2 ... $ q.matrix:'data.frame': ..$ item : int [1:100] 1 1 1 1 2 2 2 2 3 3 ... ..$ categ: int [1:100] 1 2 3 4 1 2 3 4 1 2 ... ..$ A1 : num [1:100] 0 1 0 1 0 1 1 1 0 0 ... ..$ A2 : num [1:100] 0 0 1 1 0 0 0 1 0 0 ... ..$ A3 : num [1:100] 0 0 0 0 0 0 0 0 0 0 ... ..$ B1 : num [1:100] 0 0 0 0 0 0 0 0 0 0 ...
  • Dataset data.cdm03: This dataset is a resimulated dataset from Chiu, Koehn & Wu (2016) where the data generating model is a reduced RUM model. See Example 1. List of 2 $ data : num [1:725, 1:16] 0 1 1 1 1 1 1 1 1 1 ... ..- attr(*, "dimnames")=List of 2 .. ..$ : NULL .. ..$ : chr [1:16] "I01" "I02" "I03" "I04" ... $ qmatrix:'data.frame': 16 obs. of 6 variables: ..$ item: Factor w/ 16 levels "I01","I02","I03",..: 1 2 3 4 5 6 7 8 9 10 ... ..$ A1 : int [1:16] 1 0 0 0 0 0 0 0 1 1 ... ..$ A2 : int [1:16] 0 1 0 0 1 1 0 0 0 0 ... ..$ A3 : int [1:16] 0 0 1 1 1 1 0 0 0 0 ... ..$ A4 : int [1:16] 0 0 0 0 0 0 1 1 1 1 ... ..$ A5 : int [1:16] 0 0 0 0 0 0 0 0 0 0 ...

References

Chiu, C.-Y., Koehn, H.-F., & Wu, H.-M. (2016). Fitting the reduced RUM with Mplus: A tutorial. International Journal of Testing, xx, xxx-xxx.

Examples

Run this code
## Not run: 
# #############################################################################
# # EXAMPLE 1: Reduced RUM model, Chiu et al. (2016)
# #############################################################################
# 
# data(data.cdm03)
# dat <- data.cdm03$data
# qmatrix <- data.cdm03$qmatrix
# 
# #*** Model 1: Reduced RUM
# mod1 <- gdina( dat , q.matrix = qmatrix[,-1] , rule="RRUM" )
# summary(mod1)
# 
# #*** Model 2: Additive model with identity link function
# mod2 <- gdina( dat , q.matrix = qmatrix[,-1] , rule="ACDM" )
# summary(mod2)
# 
# #*** Model 3: Additive model with logit link function
# mod3 <- gdina( dat , q.matrix = qmatrix[,-1] , rule="ACDM" , linkfct="logit")
# summary(mod3)
# ## End(Not run)

Run the code above in your browser using DataLab