anova {diffIRT} | R Documentation |
Conduct a likelihood ratio test on two nested diffIRT
models
Description
Using this function, a likelihood ratio test is conducted on two nested diffIRT
model. Results are
printed to the screen togheter with the AIC, BIC, sample size adjusted BIC, and DIC comparative fit indices for both models.
Usage
## S3 method for class 'diffIRT'
anova(object, object2, ...)
Arguments
object |
a |
object2 |
a |
... |
additional parameters, currently not used. |
Author(s)
Dylan Molenaar d.molenaar@uva.nl
See Also
diffIRT for fitting diffusion IRT models.
Examples
## Not run:
# simulate data according to a D-diffusion model
# with equal a[i] parameters
data=simdiff(100,10,
ai=rep(.3,10),vi=seq(-1,1,length=10),ter=runif(10,2,3),
gamma=rlnorm(100,0,.3),theta=rnorm(100,0,.5),
model="D")
# fit a full D-diffusion model
res=diffIRT(data$rt,data$x,model="D")
# fit a D-diffusion model subject to an
# equality constraint across all a[i] parameters
res2=diffIRT(data$rt,data$x,model="D",constrain=c(rep(1,10),2:21,22,23))
# use the anova function to conduct the likelihood ratio test
anova(res2,res)
## End(Not run)
[Package diffIRT version 1.5 Index]