if (FALSE) {
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)
}
Run the code above in your browser using DataLab