Description Usage Arguments Value Examples
Performs a likelihood ratio F-test between nested gldrm models. The F-statistic is calculated as 2 \times (llik - llik_0) / r, where r is the difference is the number of parameters between the full and null models. The F-statistic has degrees of freedom r and n-p, where n is the number of observations and p is the number of parameters in the full model.
1 |
gldrmFit |
The full model. Must be an object of S3 class 'gldrm' returned from
the |
gldrmNull |
The sub-model being tested under the null hypotheses.
Must be an object of S3 class 'gldrm' returned from the |
An S3 object of class 'gldrmLRT', containing numerator and denominator degrees of freedom, an F-statistic, and a p-value.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(iris, package="datasets")
### Fit gldrm with all variables
fit <- gldrm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width + Species,
data=iris, link="log")
### Fit gldrm without the categorical variable "Species"
fit0 <- gldrm(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width,
data=iris, link="log")
### Likelihood ratio test for the nested models
lrt <- gldrmLRT(fit, fit0)
lrt
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.