lkjamison / mlmtools

Tools for multilevel models r package.
GNU General Public License v3.0
1 stars 2 forks source link

levelCompare does not compute a valid statistical test #3

Open fabian-s opened 2 years ago

fabian-s commented 2 years ago

https://github.com/lj5yn/mlmtools/blob/73641908247e49ef2cd3f03d9aeb32cdb2d03c6a/R/levelCompare.R#L79

Tests for zero variance components with a standard chi-square distribution are not valid level-alpha tests.

$H_0$ is on the boundary of the parameter space since variances are non-negative, so standard asymptotics don't apply: See https://doi.org/10.1016/j.csda.2007.10.022

lkjamison commented 2 years ago

Thank you for your comment - we have reviewed the attached paper and we will update the function in the next package version and apply different criteria to compare model fit.