lrt: Likelihood ratio test

View source: R/core-lrt.R

lrtR Documentation

Likelihood ratio test

Description

Computes the likelihood ratio test statistic and p-value for nested models.

Usage

lrt(null, alt, data, null_par, alt_par, dof = NULL, ...)

Arguments

null

the likelihood model for the simpler (null) hypothesis nested within the alternative model

alt

the likelihood model for the more complicated (alternative) hypothesis

data

a data frame

null_par

parameter values under the null model

alt_par

parameter values under the alternative model

dof

degrees of freedom (computed automatically if NULL)

...

additional arguments passed to loglik

Value

An lrt_result object with components stat, p.value, and dof


likelihood.model documentation built on March 19, 2026, 9:07 a.m.