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.
Arguments
- qmatrix
The Q-matrix. A data frame with 1 row per item and 1 column per attribute. All cells should be either 0 (item does not measure the attribute) or 1 (item does measure the attribute).
- item_id
Optional. Variable name of a column in
qmatrix
that contains item identifiers.NULL
(the default) indicates that no identifiers are present in the Q-matrix.- rename_att
Should attribute names from the
qmatrix
be replaced with generic, but consistent names (e.g., "att1", "att2", "att3").- rename_item
Should item names from the
qmatrix
be replaced with generic, but consistent names (e.g., 1, 2, 3).- type
Type of DCM to estimate. Must be one of lcdm, dina, dino, or crum.
- attribute_structure
Structural model specification. Must be one of unconstrained, or independent.
unconstrained
makes no assumptions about the relationships between attributes, whereasindependent
assumes that proficiency statuses on attributes are independent of each other.
Value
A tibble with one row per parameter.
Examples
get_parameters(ecpe_qmatrix, item_id = "item_id", type = "lcdm")
#> # A tibble: 75 × 4
#> item_id class attributes coef
#> <fct> <chr> <chr> <glue>
#> 1 E1 intercept NA l1_0
#> 2 E1 maineffect morphosyntactic l1_11
#> 3 E1 maineffect cohesive l1_12
#> 4 E1 interaction morphosyntactic__cohesive l1_212
#> 5 E2 intercept NA l2_0
#> 6 E2 maineffect cohesive l2_12
#> 7 E3 intercept NA l3_0
#> 8 E3 maineffect morphosyntactic l3_11
#> 9 E3 maineffect lexical l3_13
#> 10 E3 interaction morphosyntactic__lexical l3_213
#> # ℹ 65 more rows
get_parameters(ecpe_qmatrix, item_id = "item_id", type = "lcdm",
rename_att = TRUE)
#> # A tibble: 75 × 4
#> item_id class attributes coef
#> <fct> <chr> <chr> <glue>
#> 1 E1 intercept NA l1_0
#> 2 E1 maineffect att1 l1_11
#> 3 E1 maineffect att2 l1_12
#> 4 E1 interaction att1__att2 l1_212
#> 5 E2 intercept NA l2_0
#> 6 E2 maineffect att2 l2_12
#> 7 E3 intercept NA l3_0
#> 8 E3 maineffect att1 l3_11
#> 9 E3 maineffect att3 l3_13
#> 10 E3 interaction att1__att3 l3_213
#> # ℹ 65 more rows