Learn R Programming

dcmstan (version 0.1.0)

dcm_specification: S7 model specification class

Description

The dcm_specification constructor is exported to facilitate the defining of methods in other packages. We do not expect or recommend calling this function directly. Rather, to create a model specification, one should use dcm_specify().

Usage

dcm_specification(
  qmatrix = list(),
  qmatrix_meta = list(),
  measurement_model = measurement(),
  structural_model = structural(),
  priors = dcmprior()
)

Value

A dcm_specification object.

Arguments

qmatrix

A cleaned Q-matrix, as returned by rdcmchecks::clean_qmatrix().

qmatrix_meta

A list of Q-matrix metadata consisting of the other (not Q-matrix) elements returned by rdcmchecks::clean_qmatrix().

measurement_model

A measurement model object.

structural_model

A structural model object.

priors

A prior object.

See Also

dcm_specify().

Examples

Run this code
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