summary {Qval} | R Documentation |
Summary Methods for Various Objects
Description
Generate concise summary statistics for objects created by the Qval package. The output is a named list tailored to the class of the input:
CDM
contains the original call, dataset dimensions, model fit object, and attribute-pattern distribution.
validation
contains the original call, suggested Q-matrix, and original Q-matrix.
sim.data
contains the original call, dataset dimensions, and attribute-pattern distribution.
fit
contains the original call, relative fit indices and absolute fit indices.
Usage
## S3 method for class 'CDM'
summary(object, ...)
## S3 method for class 'validation'
summary(object, ...)
## S3 method for class 'sim.data'
summary(object, ...)
## S3 method for class 'fit'
summary(object, ...)
Arguments
object |
An object of class |
... |
Currently unused. Additional arguments are ignored. |
Details
- call
A string capturing the original function invocation.
- base
A numeric vector
c(N, I, K)
giving the number of examinees (N
), the number of items (I
), and the number of attributes (K
).- model.fit
(CDM only) The fitted model object returned by
CDM
.- patterns
(CDM and sim.data) A data.frame of frequencies (
freq
) and proportions (prop
) of each attribute pattern.- Q.sug
(validation only) Suggested Q-matrix from
validation
.- Q.orig
(validation only) Original Q-matrix provided by
sim.data
.- fit.relative
(fit only) Relative fit indices provided by
fit
.- fit.absolute
(fit only) Absolute fit indices provided by
fit
.
Value
A named list with class summary.<class>
containing the components above.
Methods (by class)
-
summary(CDM)
: Summary method for CDM objects -
summary(validation)
: Summary method for validation objects -
summary(sim.data)
: Summary method for sim.data objects -
summary(fit)
: Summary method for fit objects
Examples
set.seed(123)
library(Qval)
################################################################
# Example 1: summary a CDM object #
################################################################
Q <- sim.Q(3, 20)
IQ <- list(P0 = runif(20, 0, 0.2), P1 = runif(20, 0.8, 1))
data.obj <- sim.data(Q, N = 500, IQ = IQ,
model = "GDINA", distribute = "horder")
CDM.obj <- CDM(data.obj$dat, Q, model = "GDINA", method = "EM")
summary(CDM.obj)
################################################################
# Example 2: summary a validation object #
################################################################
MQ <- sim.MQ(Q, 0.1)
CDM.obj2 <- CDM(data.obj$dat, MQ)
val.obj <- validation(data.obj$dat, MQ, CDM.obj2, method = "GDI")
summary(val.obj)
################################################################
# Example 3: summary a sim.data object #
################################################################
data.obj2 <- sim.data(Q = sim.Q(3, 10), N = 1000)
summary(data.obj2)
################################################################
# Example 4: summary a fit object #
################################################################
fit.obj <- fit(data.obj$dat, Q, model="GDINA")
summary(fit.obj)