Performs the Exploratory Deterministic Input, Noise and Gate Model (EDINA) estimation on a given data set with a prespecified k value.

edina(data, k = 3, burnin = 10000, chain_length = 20000)

Arguments

data

Binary responses to assessments in matrix form with dimensions \(N \times J\).

k

Number of Attribute Levels as a positive integer.

burnin

Number of Observations to discard on the chain.

chain_length

Length of the MCMC chain

Value

An edina object that contains:

  • coefficients: Estimated coefficients of the model fit

  • loglike_summed: Summed log-likelihood

  • loglike_pmean: Mean of log-likelihood

  • pi_classes: Latent classes

  • avg_q: Estimated Averaged Q Matrix

  • est_q: Estimated Dichotomous Q Matrix

  • or_tested: Odds Ratio used in the model selection.

  • sample_or: Odds Ratio for the sample.

  • n: Number of Observations

  • j: Number of Items

  • k: Number of Traits

  • burnin: Amount of iterations to discard

  • chain_length: Amount of iterations to retain.

  • timing: Duration of the run

  • dataset_name: Name of the data set used in estimation.

Examples

if(requireNamespace("simcdm", quietly = TRUE)) {

# Set a seed for reproducibility
set.seed(1512)

# Setup data simulation parameters
N = 1    # 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)

# Compute the edina model
edina_model = edina(items_dina, k = K)

# Display results
edina_model

# Provide a summary overview
summary(edina_model)
}
#> The EDINA model for items_dina with K = 2 
#> 
#> The model fit is as follows:
#>  k      bic      dic heuristic
#>  2 11.21918 11.91657         1
#> 
#> The estimated coefficients for the EDINA model are:
#>        Guessing SD(Guessing) Slipping SD(Slipping)
#> Item1    0.4410       0.2420   0.2463       0.1907
#> Item2    0.2484       0.1933   0.4155       0.2448
#> Item3    0.2499       0.1935   0.4148       0.2448
#> Item4    0.4388       0.2432   0.2495       0.1939
#> Item5    0.4365       0.2423   0.2493       0.1931
#> Item6    0.4391       0.2421   0.2506       0.1935
#> Item7    0.2481       0.1923   0.4142       0.2448
#> Item8    0.2519       0.1942   0.4141       0.2447
#> Item9    0.2442       0.1908   0.4183       0.2460
#> Item10   0.4367       0.2429   0.2501       0.1945
#> 
#> The estimated Q matrix is:
#>        Trait1 Trait2
#> Item01 0.6181 0.6344
#> Item02 0.6805 0.6600
#> Item03 0.6694 0.6759
#> Item04 0.6330 0.6232
#> Item05 0.6220 0.6274
#> Item06 0.6250 0.6306
#> Item07 0.6673 0.6696
#> Item08 0.6647 0.6809
#> Item09 0.6730 0.6667
#> Item10 0.6333 0.6208