variationalDCM {variationalDCM} | R Documentation |
Variational Bayesian estimation for DCMs
Description
variationalDCM()
fits DCMs by VB algorithms.
Usage
variationalDCM(X, Q, model, max_it = 500, epsilon = 1e-04, verbose = TRUE, ...)
## S3 method for class 'variationalDCM'
summary(object, ...)
Arguments
X |
|
Q |
|
model |
specify one of "dina", "dino", "mc_dina", "satu_dcm", and "hm_dcm" |
max_it |
Maximum number of iterations (default: |
epsilon |
convergence tolerance for iterations (default: |
verbose |
logical, controls whether to print progress (default:
|
... |
additional arguments such as hyperparameter values |
object |
the return of the |
Value
variationalDCM
returns an object of class
variationalDCM
. We provide the summary
function to summarize a
result and users can check the following information:
- model_params
estimates of posteror means and posterior standard deviations of model parameters
- attr_mastery_pat
MAP etimates of attribute mastery patterns
- ELBO
resulting value of evidence lower bound
- time
time spent in computation
Methods (by generic)
-
summary(variationalDCM)
: print summary information
variationalDCM
The variationalDCM()
function performs recently-developed
variational Bayesian inference for various DCMs. The current version can
support the DINA, DINO, MC-DINA, saturated DCM, HM-DCM models. We briefly
introduce additional arguments that are specific to each model.
DINA model
The DINA model has two types of model parameters: slip
and guessing
for
. We name the
hyperparameters for the DINA model:
delta_0
is a L-dimensional
vector, which is a hyperparameter for the
Dirichlet distribution for the class mixing parameter
(default: NULL). When
delta_0
is specified as
NULL
, we set .
alpha_s
, beta_s
, alpha_g
, and beta_g
are
positive values. They are hyperparameters {,
,
,
} that determines the shape of prior beta
distribution for the slip and guessing parameters (default: NULL). When
they are specified as
NULL
, they are set .
DINO model
The DINO model has the same model parameters and hyperparameters as the DINA model. We thus refer the readers to the DINA model.
MC-DINA model
The MC-DINA model has additional arguments
delta_0
and a_0
. a_0
corresponds to positive hyperparamters
for all
and
.
a_0
is by default set to NULL
, and then it is specified as
for all elements.
Saturated DCM
The saturated DCM is a generalized model such as
the G-DINA and GDM. In the saturated DCM, we have hyperparameters
and
in addition to
, which can be specified as arguments
A_0
and B_0
. They are specified by default as NULL
, and then we
set weakly informative priors.
HM-DCM
When model
is specified as "hm_dcm"
, users
have additional arguments nondecreasing_attribute
,
measurement_model
, random_block_design
, Test_versions
,
Test_order
, random_start
, A_0
, B_0
,
delta_0
, and omega_0
. Users can accommodate the
nondecreasing attribute constraint, which represents the assumption that
mastered attributes are not forgotten, by setting the logical valued
argument nondecreasing_attribute
as TRUE
(default:
FALSE
). Users can also control the measurement model by specifying
measurement_model
(default: "general"
), and the current
version can deal with the HM-general DCM ("general"
) and HM-DINA
("dina"
) models. This function can also handle the datasets
collected by a random block design by specifying the logical valued
argument random_block_design
(default: FALSE
). When it is
specified as TRUE
, users must enter Test_versions
and
Test_order
. Test_versions
is an argument indicating which
version of the test each respondent has been assigned to based on a random
block design, while Test_order
indicates the sequence in which items
are rearranged based on the random block design. A_0
, B_0
,
delta_0
, and omega_0
correspond to hyperparameters
,
,
, and
.
is nonnegative
hyperparameters of Dirichlet distributions for attribute transition
probabilities.
omega_0
is by default set to NULL
, and then
we set .
References
Yamaguchi, K., & Okada, K. (2020). Variational Bayes inference for the DINA model. Journal of Educational and Behavioral Statistics, 45(5), 569-597. doi:10.3102/1076998620911934
Yamaguchi, K. (2020). Variational Bayesian inference for the multiple-choice DINA model. Behaviormetrika, 47(1), 159-187. doi:10.1007/s41237-020-00104-w
Yamaguchi, K., Okada, K. (2020). Variational Bayes Inference Algorithm for the Saturated Diagnostic Classification Model. Psychometrika, 85(4), 973–995. doi:10.1007/s11336-020-09739-w
Yamaguchi, K., & Martinez, A. J. (2024). Variational Bayes inference for hidden Markov diagnostic classification models. British Journal of Mathematical and Statistical Psychology, 77(1), 55–79. doi:10.1111/bmsp.12308
Examples
# fit the DINA model
Q = sim_Q_J80K5
sim_data = dina_data_gen(Q=Q,I=200)
res = variationalDCM(X=sim_data$X, Q=Q, model="dina")
summary(res)