lrtPV: Likelihood Ratio Test with Model Results Using Plausible...

View source: R/lrtPV.R

lrtPVR Documentation

Likelihood Ratio Test with Model Results Using Plausible Values

Description

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).

Usage

lrtPV(mf, mr)

Arguments

mf

The full model object fit using mixPV.

mr

The reduced model object fit using mixPV.

References

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.

Examples

## 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)


MLMusingR documentation built on April 3, 2025, 5:43 p.m.