Conducts a likelihood ratio test to compare the fit of two models. The test evaluates whether a model with more parameters provides a significantly better fit than a model with fewer parameters.
LRT.test(object1, object2)An object of class "htest" containing:
statistic: VLMR adjusted test statistic
parameter: Degrees of freedom (\(df = npar_2 - npar_1\))
p.value: P-value from \(\chi^2_df\) distribution
method: Name of the test
data.name: Model comparison description
Fitted model object with fewer parameters (i.e., fewer npar, small model).
Fitted model object with more parameters (i.e., more npar, large model).
Note that since the small model may be nested within the large model, the result
of LRT.test may not be accurate and is provided for reference only.
More reliable conclusions should be based on a combination of fit indices (i.e., get.fit.index),
classification accuracy measures (i.e., get.entropy, get.AvePP), and a bootstrapped
likelihood-ratio test (i.e., BLRT, LRT.test.Bootstrap, which is very time-consuming).
Above all and the most important criterion, is that the better model is the one that aligns with theoretical
expectations and offers clear interpretability.
The LRT.test test statistic is defined as:
The models must be nested (i.e., the model with fewer parameters is a constrained version of the more one).
Both models must be fit on the identical dataset with the same response variables.
The test statistic asymptotically follows a chi-square distribution.
$$LRT = -2 \times (\text{LogLik}_{1} - \text{LogLik}_{2})$$ where:
\(\text{LogLik}_{1}\): Log-likelihood of the smaller model (fewer parameters).
\(\text{LogLik}_{2}\): Log-likelihood of the larger model (more parameters).
Under the null hypothesis (H_0: small model is true), LRT asymptotically follows
a chi-square distribution with \(df\) degrees of freedom.