- Compute the log-likelihood of both the models using the 'LogLikelihood' property.
- Derive the test-statistic as '-2* (difference of log likelihood of both the models)'
- Compute the degrees of freedom using the 'NumEstimatedCoefficients' property.
- Compute the p-value using 'chi2cdf' to compare the two models.
- 'GeneralizedLinearModel': https://www.mathworks.com/help/stats/generalizedlinearmodel.html
- 'GeneralizedLinearMixedModel': https://www.mathworks.com/help/stats/generalizedlinearmixedmodel-class.html
- 'chi2cdf': https://www.mathworks.com/help/stats/chi2cdf.html
- 'LogLikelihood': https://www.mathworks.com/help/stats/generalizedlinearmixedmodel-class.html#bubtdtx-LogLikelihood
- 'NumEstimatedCoefficients': https://www.mathworks.com/help/stats/generalizedlinearmixedmodel-class.html#bubtdtx-NumEstimatedCoefficients