Description Usage Arguments Value Warning Author(s) See Also Examples
A generic function to conduct a likelihood ratio test between two nested models.
1 2 |
object |
an object inheriting from class |
object2 |
an object inheriting from class |
... |
additional arguments; currently none is used. |
An object of either class anova.flirt
with components,
name0 |
the name of |
L0 |
the log-likelihood under the null hypothesis ( |
aic0 |
the AIC value for the model given by |
bic0 |
the BIC value for the model given by |
name1 |
the name of |
L1 |
the log-likelihood under the alternative hypothesis ( |
aic1 |
the AIC value for the model given by |
bic1 |
the BIC value for the model given by |
LRT |
the value of the Likelihood Ratio Test statistic. |
df |
the degrees of freedom for the test (i.e., the difference in the number of parameters). |
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 for the LRT to be valid.
Minjeong Jeon <jeon.117@osu.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(flirt)
## verbal aggression data
data(verb2)
# 2-dimensional 2PL model for binary data: a(th+b) parameterization
model1 <- flirt(data=verb2, select=2:25, loading=list(on=TRUE, inside=TRUE),
mul=list(on=TRUE, dim_info=list(dim1=1:12, dim2=13:24)) )
# 2-dimensional Rasch model
model2 <- flirt(data=verb2, select=2:25,
mul=list(on=TRUE, dim_info=list(dim1=1:12, dim2=13:24)) )
# LR test
anova(model2, model1) # model1 is nested within model2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.