Run the Bayesian Sigmoid Growth Model
growth_sigmoid_model.RdFor additional information on additional function arguments, reference:
brms::brms() and the stan
documentation.
Usage
growth_sigmoid_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_sigmoid_stanvar(),
expose_functions = TRUE,
...
)Arguments
- data
data.frameof experimental data. Must contain column representing the treatment, response and predictors specified in the formula.- formula
bpformulaobject. To create a growth model formula, usegrowth_sigmoid_formula()- prior
brmspriorsdata.frameforK,K0,rate, andlambda. To create a prior, usegrowth_sigmoid_prior().- init
initial values of the parameters being modeled. To create an init, use
growth_sigmoid_init()- iter
numericvalue for the number of iterations the model runs. Increasingitercan help with model convergence- control
a named
listof parameters to control the sampler's behavior. Addingmax_treedepthand giving a greater value than10can 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 runbrms::loo_compare()- ...
additional arguments passed to
brms::brm()
Value
bpfit a wrapper for brms::brmsfit()
See also
Helper functions: growth_sigmoid_formula, and growth_sigmoid_prior, growth_sigmoid_init and brms::brmsfit
Examples
if (FALSE) { # \dontrun{
BayesPharma::growth_sigmoid_model(
data = data,
formula = BayesPharma::growth_richards_formula(predictors = 0 + drug))
} # }