Updates both components of a bayesnechurdlefit

# S3 method for class 'bayesnechurdlefit'
update(object, newdata = NULL, recompile = NULL, x_range = NULL, ...)

Arguments

object

An object of class bayesnechurdlefit.

newdata

Optional new data. Split into the two component datasets the same way bnec_hurdle does, so zeros continue to denote the hurdle rather than being modelled as small responses, and checked the same way. A response that is not numeric, holds a missing or negative value, or has no zero or no value above zero is refused with the message bnec_hurdle gives, as is a row that is both zero and censored. Each component is refitted with the family it was fitted with, as update.bnecfit describes. Both components are checked against their families before either is refitted, so new data that put the growth component at a bound in every observation, such as a Beta growth component of 1 throughout, are refused, naming that component.

recompile

As for update.bnecfit.

x_range

As for update.bnecfit. A NULL inherits the recorded range, or follows the whole new concentration series where bnec_hurdle was given no range.

...

Further arguments passed to update.bnecfit for each component. A family is passed to the growth component only. The survival component is always refitted as bernoulli. The growth family is checked as bnec_hurdle checks family_growth, before either component is refitted. A family bnec_hurdle refuses for the growth component, such as hurdle_gamma, is refused. So is a family the growth component's disp() term cannot be refitted under, as update.bnecfit describes, such as poisson. A poisson or negbinomial family needs brms 2.23.2 or later, and the growth component is then refitted with the zero-truncated likelihood bnec_hurdle uses. An argument that is not supplied, such as x_range, is taken by each component from its own fit, as update.bnecfit describes. Where newdata is supplied and bnec_hurdle was given no x_range, the growth component is predicted over the whole concentration series of newdata, as bnec_hurdle predicts it.

Value

An object of class bayesnechurdlefit.