ltm, rasch and tpm models.unidimTest(object, data, thetas, IRT = TRUE, z.vals = NULL,
B = 100, ...)ltm, class rasch or class tpm. For
ltm() it is assumed that the two-parameter logistic model has been fitted (i.e., one latent variable and
nmatrix or a data.frame of response patterns with columns denoting the items; used
if object is missing.matrix with IRT model parameter values to be used in rmvlogis; used if
object is missing.TRUE, then argument thetas contains the measurement model parameters under the
usual IRT parameterization (see rmvlogis); used if object is missdata, providing ability estimates.
If object is supplied then the abilities are estimated using factor.scorespolycor().unidimTest is a list with components,object if that was supplied.polycor() from package `polycor', and the largest one is taken as communality estimate.
A Monte Carlo procedure is used to approximate the distribution of this statistic under the null hypothesis.
In particular, the following steps are replicated B times:
[object Object],[object Object],[object Object]
Denote by $T_{obs}$ the value of the statistic (i.e., the second eigenvalue) for the original data-set. Then the
$p$-value is approximated according to the formula $\left(1 + \sum_{b = 1}^B I(T_b \geq T_{obs})\right) /
(1 + B)$, where $I(.)$ denotes the indicator function, and
$T_b$ denotes the value of the statistic in the $b$th data-set.descript# Unidimensionality Check for the LSAT data-set
# under a Rasch model:
out <- unidimTest(rasch(LSAT))
out
plot(out, type = "b", pch = 1:2)
legend("topright", c("Real Data", "Average Simulated Data"), lty = 1,
pch = 1:2, col = 1:2, bty = "n")Run the code above in your browser using DataLab