Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

calc_lrt

Lo-Mendell-Rubin likelihood ratio test


Description

Implements the ad-hoc adjusted likelihood ratio test (LRT) described in Formula 15 of Lo, Mendell, & Rubin (2001), or LMR LRT.

Usage

calc_lrt(n, null_ll, null_param, null_classes, alt_ll, alt_param, alt_classes)

Arguments

n

Integer. Sample size

null_ll

Numeric. Log-likelihood of the null model.

null_param

Integer. Number of parameters of the null model.

null_classes

Integer. Number of classes of the null model.

alt_ll

Numeric. Log-likelihood of the alternative model.

alt_param

Integer. Number of parameters of the alternative model.

alt_classes

Integer. Number of classes of the alternative model.

Value

A numeric vector containing the likelihood ratio LR, the ad-hoc corrected LMR, degrees of freedom, and the LMR p-value.

References

Lo Y, Mendell NR, Rubin DB. Testing the number of components in a normal mixture. Biometrika. 2001;88(3):767–778. doi:10.1093/biomet/88.3.767

Examples

calc_lrt(150L, -741.02, 8, 1, -488.91, 13, 2)

tidyLPA

Easily Carry Out Latent Profile Analysis (LPA) Using Open-Source or Commercial Software

v1.0.8
MIT + file LICENSE
Authors
Joshua M Rosenberg [aut, cre], Caspar van Lissa [aut], Jennifer A Schmidt [ctb], Patrick N Beymer [ctb], Daniel Anderson [ctb], Matthew J. Schell [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.