Last chance! 50% off unlimited learning
Sale ends in
Performs a Likelihood Ratio Test between two nested IRT models.
# S3 method for gpcm
anova(object, object2, simulate.p.value = FALSE,
B = 200, verbose = getOption("verbose"), seed = NULL, …)# S3 method for grm
anova(object, object2, …)
# S3 method for ltm
anova(object, object2, …)
# S3 method for rasch
anova(object, object2, …)
# S3 method for tpm
anova(object, object2, …)
an object inheriting from either class gpcm
, class grm
, class ltm
, class rasch
or class tpm
, representing the model under the null hypothesis.
an object inheriting from either class gpcm
, class grm
, class ltm
, class rasch
,
or class tpm
, representing the model under the alternative hypothesis.
logical; if TRUE
, the reported
the number of Bootstrap samples.
logical; if TRUE
, information is printed in the console during the parametric Bootstrap.
the seed to be used during the parametric Bootstrap; if NULL
, a random seed is used.
additional arguments; currently none is used.
An object of either class aov.gpcm
, aov.grm
, class aov.ltm
or class aov.rasch
with components,
the name of object
.
the log-likelihood under the null hypothesis (object
).
the number of parameter in object
; returned only in aov.gpcm
.
the AIC value for the model given by object
.
the BIC value for the model given by object
.
the name of object2
.
the log-likelihood under the alternative hypothesis (object2
).
the number of parameter in object
; returned only in aov.gpcm
.
the AIC value for the model given by object2
.
the BIC value for the model given by object2
.
the value of the Likelihood Ratio Test statistic.
the degrees of freedom for the test (i.e., the difference in the number of parameters).
the
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 object2
represents a three parameter model, note that the
null hypothesis in on the boundary of the parameter space for the guessing parameters. Thus, the Chi-squared reference
distribution used by these function might not be totally appropriate.
anova.gpcm()
also includes the option to estimate the B
data sets are simulated under the null hypothesis (i.e., under the generalized partial credit model
object
), and both the null and alternative models are fitted and the value of LRT is computed. Then the
In addition, when simulate.p.value = TRUE
objects of class aov.gpcm
have a method for the plot()
generic function
that produces a QQ plot comparing the Bootstrap sample of likelihood ration statistic with the asymptotic chi-squared distribution. For instance,
you can use something like the following: lrt <- anova(obj1, obj2, simulate.p.value = TRUE); plot(lrt)
.
# NOT RUN {
## LRT between the constrained and unconstrained GRMs
## for the Science data:
fit0 <- grm(Science[c(1,3,4,7)], constrained = TRUE)
fit1 <- grm(Science[c(1,3,4,7)])
anova(fit0, fit1)
## LRT between the one- and two-factor models
## for the WIRS data:
anova(ltm(WIRS ~ z1), ltm(WIRS ~ z1 + z2))
## An LRT between the Rasch and a constrained
## two-parameter logistic model for the WIRS data:
fit0 <- rasch(WIRS)
fit1 <- ltm(WIRS ~ z1, constraint = cbind(c(1, 3, 5), 2, 1))
anova(fit0, fit1)
## An LRT between the constrained (discrimination
## parameter equals 1) and the unconstrained Rasch
## model for the LSAT data:
fit0 <- rasch(LSAT, constraint = rbind(c(6, 1)))
fit1 <- rasch(LSAT)
anova(fit0, fit1)
## An LRT between the Rasch and the two-parameter
## logistic model for the LSAT data:
anova(rasch(LSAT), ltm(LSAT ~ z1))
# }
Run the code above in your browser using DataLab