Learn R Programming

Qval (version 1.2.3)

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.

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, ...)

Value

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

Arguments

object

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

...

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

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.

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