View source: R/model-comparison.R
| anova.beezdemand_hurdle | R Documentation |
Compare nested hurdle demand models using likelihood ratio tests.
## S3 method for class 'beezdemand_hurdle'
anova(object, ...)
object |
A |
... |
Additional |
All models must be fit to the same data. Models are ordered by degrees of freedom, and sequential likelihood ratio tests are performed.
An object of class anova.beezdemand containing:
Data frame with model comparison statistics
Likelihood ratio test results
data(apt)
fit2 <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id",
random_effects = c("zeros", "q0"))
fit3 <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id",
random_effects = c("zeros", "q0", "alpha"))
anova(fit2, fit3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.