Learn R Programming

ltm (version 0.8-9)

anova: Anova method for fitted IRT models

Description

Performs a Likelihood Ratio Test between two nested IRT models.

Usage

## S3 method for class 'grm':
anova(object, object2, \dots)

## S3 method for class 'ltm':
anova(object, object2, \dots)

## S3 method for class 'rasch':
anova(object, object2, \dots)

## S3 method for class 'tpm':
anova(object, object2, \dots)

Arguments

object
an object inheriting from either class grm, class ltm, class rasch or class tpm, representing the model under the null hypothesis.
object2
an object inheriting from either class grm, class ltm, class rasch, or class tpm, representing the model under the alternative hypothesis.
...
additional arguments; currently none is used.

Value

  • An object of either class aov.grm, class aov.ltm or class aov.rasch with components,
  • nam0the name of object.
  • L0the log-likelihood under the null hypothesis (object).
  • aic0the AIC value for the model given by object.
  • bic0the BIC value for the model given by object.
  • nam1the name of object2.
  • L1the log-likelihood under the alternative hypothesis (object2).
  • aic1the AIC value for the model given by object2.
  • bic1the BIC value for the model given by object2.
  • LRTthe value of the Likelihood Ratio Test statistic.
  • dfthe degrees of freedom for the test (i.e., the difference in the number of parameters).
  • p.valuethe $p$-value of the test.

Warning

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.

See Also

GoF.rasch, grm, ltm, rasch, tpm

Examples

Run this code
## 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