S3 method for update that re-fits the model with
modified arguments. Reuses the original call recorded in fit$call.
If the fit was produced with freeze_call = TRUE, the data snapshot
on fit$data_snapshot is used in place of looking up names in the
caller's environment.
Examples
# \donttest{
data(YX_bin_list)
fit <- lame(YX_bin_list$Y, YX_bin_list$X, family = "binary",
burn = 5, nscan = 20, odens = 1, verbose = FALSE)
#> Warning: `family` = "binary" but `Y` contains values other than 0/1.
#> ℹ `Y` will be thresholded to `1 * (Y > 0)`; if you meant counts, use "poisson",
#> or "ordinal"/"normal" as appropriate.
# toggle dynamic_beta on without rewriting the whole call
fit_dyn <- update(fit, dynamic_beta = "dyad")
#> Warning: `family` = "binary" but `Y` contains values other than 0/1.
#> ℹ `Y` will be thresholded to `1 * (Y > 0)`; if you meant counts, use "poisson",
#> or "ordinal"/"normal" as appropriate.
dim(fit_dyn$BETA) # 3-D now
#> [1] 20 4 4
# }