R Documentation |
Print concise, user-friendly summaries of objects generated by the Qval package.
Supports objects of classes CDM
, validation
, sim.data
,
fit
, as well as their corresponding summary objects.
## S3 method for class 'CDM'
print(x, ...)
## S3 method for class 'validation'
print(x, ...)
## S3 method for class 'sim.data'
print(x, ...)
## S3 method for class 'fit'
print(x, ...)
## S3 method for class 'summary.CDM'
print(x, ...)
## S3 method for class 'summary.validation'
print(x, ...)
## S3 method for class 'summary.sim.data'
print(x, ...)
## S3 method for class 'summary.fit'
print(x, ...)
x |
An object of the appropriate class (e.g., |
... |
Currently unused. Additional arguments are ignored. |
The print
methods provide an at-a-glance view of key information:
displays sample size, item and attribute counts, and package information.
shows suggested modifications to the Q-matrix, marking changed entries with an asterisk.
reports dimensions of simulated data and offers guidance on extraction.
show basic fit indices.
prints fitted model details and alpha-pattern distribution from a summary.CDM
object.
prints suggested Q-matrix changes or a message if none are recommended.
prints attribute-pattern frequencies and proportions from summary.sim.data
.
prints basic fit indices from summary.fit
.
Invisibly returns x
.
print(CDM)
: Print method for CDM objects
print(validation)
: Print method for validation objects
print(sim.data)
: Print method for sim.data objects
print(fit)
: Print method for fit objects
print(summary.CDM)
: Print method for summary.CDM objects
print(summary.validation)
: Print method for summary.validation objects
print(summary.sim.data)
: Print method for summary.sim.data objects
print(summary.fit)
: Print method for summary.fit objects
set.seed(123)
library(Qval)
################################################################
# Example 1: print a CDM object #
################################################################
Q <- sim.Q(3, 20)
IQ <- list(P0 = runif(20, 0.0, 0.2), P1 = runif(20, 0.8, 1.0))
data.obj <- sim.data(Q = Q, N = 500, IQ = IQ,
model = "GDINA", distribute = "horder")
CDM.obj <- CDM(data.obj$dat, Q, model = "GDINA",
method = "EM", maxitr = 2000, verbose = 1)
print(CDM.obj)
################################################################
# Example 2: print a validation object #
################################################################
set.seed(123)
MQ <- sim.MQ(Q, 0.1)
CDM.obj <- CDM(data.obj$dat, MQ)
validation.obj <- validation(data.obj$dat, MQ, CDM.obj,
method = "GDI")
print(validation.obj)
################################################################
# Example 3: print a sim.data object #
################################################################
set.seed(123)
Q2 <- sim.Q(3, 10)
data.obj2 <- sim.data(Q = Q2, N = 1000)
print(data.obj2)
################################################################
# Example 4: print a fit object #
################################################################
set.seed(123)
Q2 <- sim.Q(3, 10)
fit.obj <- fit(Y = data.obj$dat, Q = Q, model = "GDINA")
print(fit.obj)
################################################################
# Example 5: print summary objects #
################################################################
summary.CDM.obj <- summary(CDM.obj)
print(summary.CDM.obj)
summary.val.obj <- summary(validation.obj)
print(summary.val.obj)
summary.sim.obj <- summary(data.obj2)
print(summary.sim.obj)
summary.fit <- summary(fit.obj)
print(summary.fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.