| lrtest | R Documentation |
Performs a likelihood ratio test to compare two nested Generalized Kumaraswamy regression models.
lrtest(object, object2)
object |
A fitted model object of class |
object2 |
A fitted model object of class |
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.
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
Lopes, J. E.
anova.gkwreg
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.