extract.Rd
A unified extractor for retrieving components from objects generated by the Qval package.
extract(object, what, ...)
# S3 method for class 'CDM'
extract(object, what, ...)
# S3 method for class 'validation'
extract(object, what, ...)
# S3 method for class 'sim.data'
extract(object, what, ...)
An object of class CDM
, validation
, or sim.data
.
A character string naming the component to extract.
Additional arguments (unused).
The requested component, whose type depends on what
and the class of object
.
This generic function and its methods allow users to extract internal elements from
objects of class CDM
, validation
, or sim.data
without directly
accessing object slots. Supported components vary by class:
CDM
The underlying GDINA or BM fit object.
EAP-based attribute estimates for each individual.
Posterior probabilities of attribute patterns.
Marginal mastery probability matrix.
Prior attribute weights from final iteration.
Model deviance (-2 * marginal log-likelihood).
Number of estimated parameters.
Akaike Information Criterion.
Bayesian Information Criterion.
Original function call.
validation
Original Q-matrix.
Suggested Q-matrix.
time cost for validation.
Iteration-by-item modification log.
Total iterations performed.
Attribute priority matrix (PAA method only).
Data for Hull plot (Hull method only).
Original function call.
sim.data
Simulated response matrix (N × I).
Simulated Q-matrix.
True attribute pattern matrix (N × K).
Category success probabilities list.
Delta parameter list.
Higher-order parameter list.
Multivariate normal distribution parameters.
Item/category success probabilities matrix.
Original function call.
extract(CDM)
: Extract fields from a CDM object
extract(validation)
: Extract fields from a validation object
extract(sim.data)
: Extract fields from a sim.data object
library(Qval)
set.seed(123)
if (FALSE) { # \dontrun{
################################################################
# Example 1: sim.data extraction #
################################################################
Q <- sim.Q(3, 10)
data.obj <- sim.data(Q, N = 200)
extract(data.obj, "dat")
################################################################
# Example 2: CDM extraction #
################################################################
CDM.obj <- CDM(data.obj$dat, Q)
extract(CDM.obj, "alpha")
extract(CDM.obj, "AIC")
################################################################
# Example 3: validation extraction #
################################################################
validation.obj <- validation(data.obj$dat, Q, CDM.obj)
extract(validation.obj, "Q.sug")
} # }