step3_1t: Result function for latent regression

View source: R/step3_1t.R

step3_1tR Documentation

Result function for latent regression

Description

Result function for latent regression.Details can be found in Iaconangelo (2017).

Usage

step3_1t(eap, cep, covar, K, method)

Arguments

eap

expected a posteriori.

cep

classification error probabilities.

covar

covariances.

K

number of attributes.

method

the sample-level "SL" or the posterior distribution level "PDL" correction weights.

Value

A data.frame containing the following columns:

Attribute

The attribute.

Estimate

Estimated regression coefficient.

odds.ratio

Odds ratio.

d

Effect size.

SE

Standard error.

CI.95

95% confidence interval.

z.value

Wald test z-statistics.

p.2tailed

Two-tailed p-value.

p.1tailed

One-tailed p-value.

References

Iaconangelo, C. (2017). Uses of classification error probabilities in the three-step approach to estimating cognitive diagnosis models (Doctoral dissertation). https://rucore.libraries.rutgers.edu/rutgers-lib/55495/PDF/1/play/

Examples

# ---- Runable example (using simulated CEP) ----
if (requireNamespace("GDINA", quietly = TRUE)) {
  library(GDINA)
  dat <- sim10GDINA$simdat
  Q <- matrix(c(1,0,0,
                0,1,0,
                0,0,1,
                1,0,1,
                0,1,1,
                1,1,0,
                0,0,1,
                1,0,0,
                1,1,1,
                1,0,1), byrow = TRUE, ncol = 3)
  fit.object <- GDINA(dat, Q = Q, model = "GDINA", att.dist = "independent", verbose = FALSE)
  cep_test <- list(SL.k = list(), PDL.k = list())
  for (i in 1:3) {
    cep_test$SL.k[[i]] <- matrix(runif(4, min = 0, max = 1), nrow = 2)
    cep_test$PDL.k[[i]] <- lapply(1:1000, function(j) matrix(runif(4, min = 0, max = 1), nrow = 2))
  }
  eap <- personparm(fit.object, what = "EAP")
  covar_test <- matrix(runif(3000, min = -2, max = 2), nrow = 1000)
  K <- 3
  result_SL <- step3_1t(eap = eap, cep = cep_test, covar = covar_test, K = K, method = "SL")
  result_PDL <- step3_1t(eap = eap, cep = cep_test, covar = covar_test, K = K, method = "PDL")
}

# ---- Not recommended to run (depends on CEP() output) ----
## Not run: 
fit.object <- GDINA(dat = dat, Q = Q, model = "GDINA", att.dist = "independent", verbose = FALSE)
cep <- CEP_1t(fit.object)
eap <- personparm(fit.object, what = "EAP")
out_PDL <- step3_1t(eap, Q, cep, covar, K, "PDL")
out_SL <- step3_1t(eap, Q, cep, covar, K, "SL")

## End(Not run)


LTCDM documentation built on Aug. 21, 2025, 5:26 p.m.

Related to step3_1t in LTCDM...