Skip to contents

The response column of a meta model is a placeholder on every summary row, and brms centres its default prior for the intercept of mu on the response. For a model fitted to summaries alone that default is centred on a delay of zero. This method puts a normal(1, 1) prior on the intercept instead, the scale of the lognormal family prior in epidist_family_prior(), so that a Gamma or Weibull meta fit gets a prior on the same scale as a lognormal one. On the log scale it is a median delay of about 3 days with a 95% range of roughly 0.4 to 20 days.

Usage

# S3 method for class 'epidist_meta_model'
epidist_model_prior(data, formula, default = NULL, ...)

Arguments

data

An object with class corresponding to an implemented model.

formula

An object of class stats::formula or brms::brmsformula (or one that can be coerced to those classes). A symbolic description of the model to be fitted. A formula must be provided for the distributional parameter mu, and may optionally be provided for other distributional parameters.

default

The default prior distributions from brms::default_prior(), which epidist_prior() passes so that they are not built twice. Built here where missing.

...

Additional arguments passed to fn method.

Value

A brmsprior object, or NULL when the model adds no priors.

Details

The centre is fixed rather than taken from the reported values, because a prior chosen from the data is not a prior. It would put the posterior of a small review where the data already sit and understate how much the studies disagree. The prior is added where mu is on the log scale, which is the lognormal family, whose mu is the log of the median under an identity link, and any family with a log link. Nothing is added for other links, and a model with individual level rows only adds no prior, so the family or brms default applies as it does for the marginal model.

The between study spread of any group level term, such as (1 | study), gets a half normal prior with a standard deviation of 0.25 on the scale of the linear predictor, so that a small review cannot fit that spread from almost nothing under the wide brms default. It is dropped where the formula has no group level term. The prior on the intercept of the other distributional parameters is left to the family or to brms.

Where a summary row estimates its growth rate as the pgrowth distributional parameter, see as_epidist_meta_model(), the coefficients and intercept of pgrowth get a normal(0, 0.25) prior, which is weakly informative for a delay measured in days, because the brms default is flat and the summaries carry little information about the rate. A study that reported its rate with a growth_rate_sd gets a normal prior with that centre and spread on its own coefficient, which exists under the default pgrowth ~ 0 + study formula, or on the intercept of pgrowth where it is the only study. Under another pgrowth formula the reported rates have no coefficient to act on and are dropped with a warning, so set their priors yourself.