update-method for "twinstim"
twinstim_update.RdUpdate and (by default) re-fit a "twinstim". This method is
especially useful if one wants to add the model environment
(which is required for some methods) to a fitted model object a posteriori.
Usage
# S3 method for class 'twinstim'
update(object, endemic, epidemic,
control.siaf, optim.args, model,
..., use.estimates = TRUE, evaluate = TRUE)Arguments
- object
a previous
"twinstim"fit.- endemic, epidemic
changes to the formulae – see
update.formulaandtwinstim.- control.siaf
a list (see
twinstim) to replace the given elements in the originalcontrol.siaflist. IfNULL, the original list of control arguments is removed from the call, i.e., the defaults are used intwinstim.- optim.args
see
twinstim. If a list, it will modify the originaloptim.argsusingmodifyList.- model
see
twinstim. If this is the only argument to update, re-fitting is cleverly circumvented. Enriching the fit by the model environment is, e.g., required forintensityplot.twinstim.- ...
Additional arguments to the call, or arguments with changed values.
Ifstartvalues are specified, they need to be in the same format as in the original callobject$call$start, which is either a named list of named numeric vectors or a named numeric vector; see the argument description intwinstim.- use.estimates
logical indicating if the estimates of
objectshould be used as initial values for the new fit (in thestartargument oftwinstim). Defaults toTRUE.- evaluate
If
TRUE(default), evaluate the new call else return the call.
Author
Sebastian Meyer
Inspiration and some pieces of code originate from
update.default by the R Core Team.