Skip to contents

Fit epidemiological delay distributions using a brms interface

Usage

epidist(data, formula, family, prior, backend, fn, ...)

Arguments

data

A data.frame to be used for modelling.

formula

A formula object created using brms::bf. A formula must be provided for the distributional parameter mu common to all brms families. Optionally, formulas may also be provided for additional distributional parameters.

family

A description of the response distribution and link function to be used in the model. Every family function has a link argument allowing users to specify the link function to be applied on the response variable. If not specified, default links are used. For details of supported families see brmsfamily().

prior

One or more brmsprior objects created by brms::set_prior() or related functions. These priors are passed to epidist_prior() in the prior argument. We recommend caution and the use of prior predictive checks for specifying prior distributions.

backend

Character string naming the package to use as the backend for fitting the Stan model. Options are "rstan" and "cmdstanr" (the default). This option is passed directly through to fn.

fn

The internal function to be called. By default this is brms::brm, which performs inference for the specified model. Other options brms::make_stancode, which returns the Stan code for the specified model, and brms::make_standata which returns the data passed to Stan. These options may be useful for model debugging and extensions.

...

Additional arguments for method.

See also