Learn R Programming

TAM (version 0.04-43)

anova.tam: Likelihood Ratio Test for Model Comparisons

Description

This function compares two models estimated tam or tam.mml using a likelihood ratio test.

Usage

## S3 method for class 'tam':
anova(object,object1,\dots)
## S3 method for class 'tam.mml':
anova(object,object1,\dots)

Arguments

object
Object of class tam or tam.mml
object1
Object of class tam or tam.mml
...
Further arguments to be passed

Examples

Run this code
data(sim.rasch)
# 1PL estimation
mod1 <- tam.mml(resp=sim.rasch) 
# 2PL estimation
mod2 <- tam.mml.2pl(resp=sim.rasch , irtmodel="2PL") 
# Model comparison
anova( mod1 , mod2 )
## > anova( mod1 , mod2 )
##     Model   loglike Deviance Npars      AIC      BIC    Chisq df       p
## 1 Model 1 -42077.88 84155.77    41 84237.77 84467.40 54.05078 39 0.05508
## 2 Model 2 -42050.86 84101.72    80 84261.72 84709.79       NA NA      NA

Run the code above in your browser using DataLab