| compare_hurdle_models | R Documentation |
Performs a likelihood ratio test comparing two nested hurdle demand models. Typically used to test whether adding the random effect on alpha (c_i) significantly improves model fit (3-RE vs 2-RE models).
compare_hurdle_models(model_full, model_reduced)
model_full |
A |
model_reduced |
A |
Invisibly returns a list with:
Likelihood ratio test statistic
Degrees of freedom
P-value from chi-squared distribution
Data frame with model comparison statistics
fit_demand_hurdle
data(apt)
fit3 <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id",
random_effects = c("zeros", "q0", "alpha"))
fit2 <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id",
random_effects = c("zeros", "q0"))
compare_hurdle_models(fit3, fit2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.