Performs a likelihood ratio test to compare two nested Generalized Kumaraswamy regression models.
Value
A list with class "htest" containing:
statisticThe LRT test statistic
parameterDegrees of freedom for the test
p.valueP-value from the chi-squared distribution
methodDescription of the test
data.nameNames of the compared models
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.
Examples
# \donttest{
data(GasolineYield)
# Fit nested models
fit_restricted <- gkwreg(yield ~ temp, data = GasolineYield, family = "kw")
fit_full <- gkwreg(yield ~ batch + temp, data = GasolineYield, family = "kw")
#> Warning: NaNs produced
# Likelihood ratio test
lrtest(fit_restricted, fit_full)
#>
#> Likelihood Ratio Test for Nested GKw Models
#>
#> data: fit_restricted vs fit_full
#> LRT = 113.04, df = 9, p-value < 2.2e-16
#>
# }