lrtPV | R Documentation |
Compares two nested models (a full and a reduced model). Results in an F statistic (not the traditional chi-square) with a p-value (see Huang, 2024). The full model must come first. Statistically significant results indicate that the full model fits better than the reduced model. Uses computations shown by Li et al. (1991).
lrtPV(mf, mr)
mf |
The full model object fit using mixPV. |
mr |
The reduced model object fit using mixPV. |
Huang, F. (2024). Using plausible values when fitting multilevel models with large-scale assessment data using R. Large-scale Assessments in Education, 12(7). (link)
Li, K. H., Meng, X.L., Raghunathan, T. E., & Rubin, D. B. (1991). Significance levels from repeated p-values with multiply imputed data. Statistica Sinica, 65–92.
## Not run:
data(pisa2012, package = 'MLMusingR')
reduced <- mixPV(pv1math + pv2math + pv3math + pv4math + pv5math ~
escs + (1|schoolid), data = pisa2012,
weights = c('w_fstuwt', 'w_fschwt'))
full <- mixPV(pv1math + pv2math + pv3math + pv4math + pv5math ~
escs + (escs|schoolid), data = pisa2012,
weights = c('w_fstuwt', 'w_fschwt'))
lrtPV(full, reduced)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.