qmatrix <- data.frame(
att1 = sample(0:1, size = 5, replace = TRUE),
att2 = sample(0:1, size = 5, replace = TRUE)
)
model_spec <- dcm_specify(qmatrix = qmatrix,
measurement_model = lcdm(),
structural_model = unconstrained())
stan_code(model_spec)
Run the code above in your browser using DataLab