qmatrix <- tibble::tibble(
att1 = sample(0:1, size = 15, replace = TRUE),
att2 = sample(0:1, size = 15, replace = TRUE),
att3 = sample(0:1, size = 15, replace = TRUE),
att4 = sample(0:1, size = 15, replace = TRUE)
)
dcm_specification(qmatrix = qmatrix,
qmatrix_meta = list(attribute_names = paste0("att", 1:4),
item_identifier = NULL,
item_names = 1:15),
measurement_model = lcdm(),
structural_model = unconstrained(),
priors = default_dcm_priors(lcdm(), unconstrained()))
Run the code above in your browser using DataLab