lrtest: Likelihood Ratio Test for Nested GKw Models

View source: R/gkwreg-anova.R

lrtestR Documentation

Likelihood Ratio Test for Nested GKw Models

Description

Performs a likelihood ratio test to compare two nested Generalized Kumaraswamy regression models.

Usage

lrtest(object, object2)

Arguments

object

A fitted model object of class "gkwreg" (the restricted model).

object2

A fitted model object of class "gkwreg" (the full model).

Details

This function performs a likelihood ratio test (LRT) to compare two nested models. The test statistic is:

LRT = 2(\ell_{\text{full}} - \ell_{\text{restricted}})

which follows a chi-squared distribution with degrees of freedom equal to the difference in the number of parameters.

The models must be nested (one is a special case of the other) and fitted to the same data for the test to be valid.

Value

A list with class "htest" containing:

statistic

The LRT test statistic

parameter

Degrees of freedom for the test

p.value

P-value from the chi-squared distribution

method

Description of the test

data.name

Names of the compared models

Author(s)

Lopes, J. E.

See Also

anova.gkwreg

Examples


data(GasolineYield)

# Fit nested models
fit_restricted <- gkwreg(yield ~ temp, data = GasolineYield, family = "kw")
fit_full <- gkwreg(yield ~ batch + temp, data = GasolineYield, family = "kw")

# Likelihood ratio test
lrtest(fit_restricted, fit_full)



gkwreg documentation built on Nov. 27, 2025, 5:06 p.m.