anova.rasch {ltm} | R Documentation |
Performs either a parametric Bootstrap goodness-of-fit test based on the Pearson chi-squared or a Likelihood Ratio Test between two nested models.
## S3 method for class 'rasch': anova(object, object2 = NULL, B = 49, ...)
object |
an object inheriting from class rasch . |
object2 |
an object inheriting from either class rasch or class ltm . |
B |
the number of Bootstrap samples. See Details section for more info. |
... |
additional arguments; currently none is used. |
If only object
is supplied anova.rasch
performs a parametric
Bootstrap test based on Pearson's chi-squared statistic. The Bootstrap
approximation to the reference distribution is preferable compared with
the ordinary Chi-squared approximation since the latter is not valid especially
for large number of items (=> many response patterns with expected frequencies
smaller than 1).
In particular, the Bootstrap test is implemented as follows:
object
compute the observed value of the statistic T_{obs}.B
times and estimate the p-value using
[1 + {# T_i > T_{obs}}]/(B + 1).
If both object
and object2
are supplied, then a likelihood ratio test between the two fitted
models is performed.
An object of class aov.rasch
with components,
Tobs |
the value of the Pearson's chi-squared statistic for the observed data. Returned if only object is supplied. |
B |
the B argument specifying the number of Bootstrap samples used. Returned if only object is supplied. |
call |
the matched call of object . Returned if only object is supplied. |
nam0 |
the name of object . Returned if object2 is also supplied. |
L0 |
the log-likelihood under the null hypothesis (object ). Returned if object2 is also supplied. |
aic0 |
the AIC value for the model given by object . Returned if object2 is also supplied. |
bic0 |
the BIC value for the model given by object . Returned if object2 is also supplied. |
nam1 |
the name of object2 . Returned if object2 is also supplied. |
L1 |
the log-likelihood under the alternative hypothesis (object2 ). Returned if object2 is also supplied. |
aic1 |
the AIC value for the model given by object2 . Returned if object2 is also supplied. |
bic1 |
the BIC value for the model given by object2 . Returned if object2 is also supplied. |
LRT |
the value of the Likelihood Ratio Test statistic. Returned if object2 is also supplied. |
df |
the degrees of freedom for the test (i.e., the difference in the number of parameters). Returned if object2 is also supplied. |
p.value |
the p-value of the test. |
The code does not check if the models are nested! The user is responsible to supply nested models in order the LRT to be valid.
When the manifest (response) variables matrix contains missing values the Pearson chi-squared is not computed.
Dimitris Rizopoulos dimitris.rizopoulos@med.kuleuven.be
## Not run: ## GoF for the Rasch model for the Wirs data: ## using 99+1 bootstrap samples m <- rasch(Wirs) anova(m, B = 99) ## End(Not run) ## GoF for the Rasch model for the Lsat data: m <- rasch(Lsat) anova(m) ## An LRT between the constrained (discrimination ## parameter equals 1) and the unconstrained Rasch ## model for the Wirs data: m0 <- rasch(Wirs, constraint = rbind(c(7, 1))) m1 <- rasch(Wirs) anova(m0, m1) ## An LRT between the Rasch and a constrained ## two-parameter logistic model for the Wirs data: m0 <- rasch(Wirs) m1 <- ltm(Wirs ~ z1, constraint = cbind(c(1, 3, 5), 2, 1)) anova(m0, m1) ## An LRT between constrained (discrimination ## parameter equals 1) and the unconstrained Rasch ## model for the Lsat data: m0 <- rasch(Lsat, constraint = rbind(c(6, 1))) m1 <- rasch(Lsat) anova(m0, m1) ## An LRT between the Rasch and the two-parameter ## logistic models for the Lsat data: anova(rasch(Lsat), ltm(Lsat ~ z1))