Re-fits with named arguments substituted into the original call. Pass
any argument of fit_demand_tmb() (e.g., factors = NULL,
random_effects = ~ 1, equation = "simplified"). Does NOT support
formula-update syntax (. - term) because fit_demand_tmb() is
argument-driven, not formula-driven.
Usage
# S3 method for class 'beezdemand_tmb'
update(object, ..., evaluate = TRUE)Arguments
- object
A
beezdemand_tmbobject.- ...
Named arguments to substitute into the original
fit_demand_tmb()call.- evaluate
If
TRUE(default), re-evaluate the updated call and return the new fit. IfFALSE, return the unevaluated call.
Examples
# \donttest{
data(apt)
fit <- fit_demand_tmb(apt, equation = "exponential", verbose = 0)
#> equation='exponential': Dropped 14 zero-consumption observations (146 remaining).
update(fit, equation = "simplified", evaluate = FALSE)
#> fit_demand_tmb(data = apt, equation = "simplified", verbose = 0)
# }
