Skip to contents

Helper function generally called from fitGrowth.

Usage

fitGrowthbrms(
  ss,
  iter = 2000,
  cores = getOption("mc.cores", 1),
  chains = 4,
  prior = NULL,
  backend = "cmdstanr",
  silent = 0,
  ...
)

Arguments

ss

A list generated by growthSS.

iter

A number of iterations to sample for each chain. By default half this length is taken as warm-up for the MCMC algorithm. This defaults to 2000.

cores

A number of cores to run in parallel. This defaults to 1 if the "mc.cores" option is not set. Generally this is specified as one core per chain so that the model is fit in parallel.

chains

A number of markov chains to use, this defaults to 4.

prior

A brmsprior object if growthSS did not have priors specified. If left NULL (the default) and ss does not contain priors then a warning is issued but the model will still attempt to fit.

backend

A backend for brms to use Stan through. This defaults to use "cmdstanr".

silent

Passed to brms::brm to control verbosity. This defaults to 0, the most verbose option so that messages and progress are printed. With changes to cmdstanr and brms this may be removed, but the option will be available through .... Note that this is likely to print lots of messages during warmup iterations as the MCMC gets started.

...

Additional arguments passed to brms::brm.

Value

A brmsfit object, see ?`brmsfit-class` for details.