Learn R Programming

Qval (version 1.2.4)

summary: 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.

is.Qident

contains the original call and results of whether the Q-matrix is identifiable.

att.hierarchy

contains the results of iterative attribute hierarchy exploration.

Usage

# S3 method for CDM
summary(object, ...)

# S3 method for validation summary(object, ...)

# S3 method for sim.data summary(object, ...)

# S3 method for fit summary(object, ...)

# S3 method for is.Qident summary(object, ...)

# S3 method for att.hierarchy summary(object, ...)

Value

A named list with class summary.<class> containing the components above.

Arguments

object

An object of class CDM, validation, sim.data, fit, or is.Qident.

...

Currently unused. Additional arguments are ignored.

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

  • summary(is.Qident): Summary method for is.Qident objects

  • summary(att.hierarchy): Summary method for att.hierarchy objects

Examples

Run this code
set.seed(123)
library(Qval)

# \donttest{
################################################################
# 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)
# }

Run the code above in your browser using DataLab