Learn R Programming

beezdemand (version 0.2.0)

anova.beezdemand_nlme: ANOVA Method for NLME Demand Models

Description

Compare nested NLME demand models using likelihood ratio tests.

Usage

# S3 method for beezdemand_nlme
anova(object, ...)

Value

An object of class anova.beezdemand containing model comparison statistics.

Arguments

object

A beezdemand_nlme model.

...

Additional beezdemand_nlme models to compare.

Details

For NLME models, this method delegates to nlme::anova.lme() on the underlying model objects when possible.

Examples

Run this code
# \donttest{
data(ko)
fit1 <- fit_demand_mixed(ko, y_var = "y_ll4", x_var = "x",
                         id_var = "monkey", equation_form = "zben",
                         random_effects = Q0 ~ 1)
fit2 <- fit_demand_mixed(ko, y_var = "y_ll4", x_var = "x",
                         id_var = "monkey", equation_form = "zben",
                         random_effects = Q0 + alpha ~ 1)
anova(fit1, fit2)
# }

Run the code above in your browser using DataLab