Automatically select an appropriate \(K\) dimension for a \(Q\) matrix under the Exploratory Deterministic Input, Noise And gate (EDINA) Model.
auto_edina(data, k = 2:4, burnin = 10000, chain_length = 20000)
An auto_edina
object that contains:
edina_models
: A list containing all estimated edina
model objects.
criterions
: Information criterions calculated for each model
k_checked
: Varying k
dimensions checked.
j
: Number of Items
if(requireNamespace("simcdm", quietly = TRUE)) {
# Set a seed for reproducibility
set.seed(1512)
# Setup data simulation parameters
N = 15 # Number of Examinees / Subjects
J = 10 # Number of Items
K = 2 # Number of Skills / Attributes
# Note:
# Sample size and attributes have been reduced to create a minimally
# viable example that can be run during CRAN's automatic check.
# Please make sure to have a larger sample size...
# Assign slipping and guessing values for each item
ss = gs = rep(.2, J)
# Simulate an identifiable Q matrix
Q = simcdm::sim_q_matrix(J, K)
# Simulate subject attributes
subject_alphas = simcdm::sim_subject_attributes(N, K)
# Simulate items under the DINA model
items_dina = simcdm::sim_dina_items(subject_alphas, Q, ss, gs)
# \donttest{
# Requires at least 15 seconds of execution time.
# Three EDINA models will be fit with increasing number of attributes.
model_set_edina = auto_edina(items_dina, k = 2:4)
# Display results
model_set_edina
# Retrieve criterion table
table = summary(model_set_edina)
# Extract "best model"
best_model(model_set_edina)
# }
}
#> Starting the estimation procedure ...
#> Working on k = 2 ...
#> Time Elapsed: 1.488
#> Working on k = 3 ...
#> Time Elapsed: 1.92
#> Working on k = 4 ...
#> Time Elapsed: 2.569
#> The EDINA model for data with K = 2
#>
#> The model fit is as follows:
#> k bic dic heuristic
#> 2 318.8249 175.2029 0.02222222
#>
#> The estimated coefficients for the EDINA model are:
#> Guessing SD(Guessing) Slipping SD(Slipping)
#> Item1 0.3959 0.1772 0.2386 0.1447
#> Item2 0.2637 0.1467 0.4050 0.1821
#> Item3 0.1220 0.1070 0.3213 0.1670
#> Item4 0.1414 0.1186 0.1433 0.1234
#> Item5 0.3301 0.1516 0.2359 0.1393
#> Item6 0.2192 0.1304 0.3106 0.1648
#> Item7 0.2278 0.1109 0.4920 0.2021
#> Item8 0.2920 0.1590 0.3375 0.1729
#> Item9 0.4198 0.1449 0.3401 0.1458
#> Item10 0.2272 0.1398 0.2441 0.1438
#>
#> The estimated Q matrix is:
#> Trait1 Trait2
#> Item01 0.6418 0.5205
#> Item02 0.6194 0.5121
#> Item03 0.5409 0.6620
#> Item04 0.4881 0.6256
#> Item05 0.5454 0.6601
#> Item06 0.5941 0.6817
#> Item07 0.7514 0.7612
#> Item08 0.6271 0.5074
#> Item09 0.6640 0.6284
#> Item10 0.5025 0.6315