Learn R Programming

dcmstan (version 0.1.0)

get_parameters: Identify parameters included in a diagnostic classification model

Description

When specifying prior distributions, it is often useful to see which parameters are included in a given model. Using the Q-matrix and type of diagnostic model to estimated, we can create a list of all included parameters for which a prior can be specified.

Usage

get_parameters(x, qmatrix, ..., identifier = NULL)

Value

A tibble showing the available parameter types and coefficients for a specified model.

Arguments

x

A model specification (e.g., dcm_specify(), measurement model (e.g., lcdm()), or structural model (e.g., unconstrained()) object.

qmatrix

The Q-matrix. A data frame with 1 row per item and 1 column per attribute. May optionally include an additional column of item identifiers. If an identifier column is included, this should be specified with identifier. All cells for the remaining attribute columns should be either 0 (item does not measure the attribute) or 1 (item does measure the attribute).

...

Additional arguments passed to methods.

identifier

Optional. If present, the quoted name of the column in the qmatrix that contains item identifiers.

Examples

Run this code
qmatrix <- tibble::tibble(item = paste0("item_", 1:10),
                          att1 = sample(0:1, size = 10, replace = TRUE),
                          att2 = sample(0:1, size = 10, replace = TRUE),
                          att3 = sample(0:1, size = 10, replace = TRUE),
                          att4 = sample(0:1, size = 10, replace = TRUE))
get_parameters(dina(), qmatrix = qmatrix, identifier = "item")

Run the code above in your browser using DataLab