rstan_default_init | R Documentation |
rstan
scalar initBy default, rstan will initialize parameters uniformly at random in the range (-2, 2), on the unconstrained scale. Description of how stan transforms parameters to satisfy constraints is described in the stan documentation
This helper is especially useful for running models using the cmdstanr backend, which requires all parameters (including distributional) parameters to be initialized.
rstan_default_init(lb = NULL, ub = NULL, dim = 0)
lb |
|
ub |
|
dim |
|
function that return the default brms initial value for a parameter.
If dim=0
, then it will be a numeric scalar, if dim=1
or greater, than
return an array with the given dimension.
rstan::stan
## Not run:
# Explicitly set the default initialization for the distributional parameter
# 'sigma' when family=gaussian().
init <- BayesPharma::sigmoid_antagonist_init(
sigma = BayesPharma::rstan_default_scalar_init(lb = 0))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.