Refit a single bayesnecfit

Refit a bayesmanecfit model set

# S3 method for class 'bayesnecfit'
update(
  object,
  newdata = NULL,
  recompile = NULL,
  x_range = NULL,
  resolution = NULL,
  sig_val = NULL,
  loo_controls,
  force_fit = FALSE,
  ...
)

# S3 method for class 'bayesmanecfit'
update(
  object,
  newdata = NULL,
  recompile = NULL,
  x_range = NULL,
  resolution = NULL,
  sig_val = NULL,
  loo_controls,
  force_fit = FALSE,
  ...
)

Arguments

object

An object of class bnecfit as fitted by function bnec.

newdata

Optional data.frame to update the model with new data. Data-dependent default priors will not be updated automatically.

recompile

A logical, indicating whether the Stan model should be recompiled. If NULL (the default), update tries to figure out internally, if recompilation is necessary. Setting it to FALSE will cause all Stan code changing arguments to be ignored.

x_range, resolution, sig_val

As for bnec. Each is taken from object unless supplied, and is the bnec default where object records none, as an object fitted by an earlier version of bayesnec does not. An x_range of NA, the default of bnec, follows the range of newdata.

loo_controls

As for bnec. An element not named is taken from object, as amend describes.

force_fit

Whether to refit where family names a family or link that differs from the one the model was fitted with. New data alone never require it.

...

Further arguments to brm.

Value

A bayesnecfit if the equation refits successfully.

A bayesmanecfit if several equations refit, or a bayesnecfit if only one succeeds.