Skip to contents

For additional information on additional function arguments, reference: brm and the stan documentation.

Usage

growth_richards_model(
  data,
  formula = growth_richards_formula(),
  prior = growth_richards_prior(),
  init = growth_richards_init(),
  iter = 8000,
  control = list(adapt_delta = 0.99),
  stanvar_function = growth_richards_stanvar(),
  expose_functions = TRUE,
  ...
)

Arguments

data

data.frame of experimental data. Must contain column representing the treatment, response and predictors specified in the formula.

formula

bpformula object. To create a growth model formula, use growth_richards_formula()

prior

brms::brmsprior data.frame for K, K0, rate, lambda, and nu. To create a prior, use growth_richards_prior()

init

initial values of the parameters being modeled. To create an init, use growth_richards_init()

iter

numeric value for the number of iterations the model runs. Increasing iter can help with model convergence

control

a named list of parameters to control the sampler's behavior. Adding max_treedepth and giving a greater value than 10 can improve model convergence

stanvar_function

Stan code for the model

expose_functions

logical. Expose the Stan functions for the model. This is needed e.g. to run brms::loo_compare()

...

additional arguments passed to brms::brm()

Value

bpfit which wraps brms::brmsfit()

Examples

if (FALSE) { # \dontrun{
  BayesPharma::growth_sigmoid_model(
    data = data,
    formula = BayesPharma::growth_richards_formula(predictors = 0 + drug))
} # }