Helper Function to Create the Default rstan
scalar init
rstan_default_init.Rd
By 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.
Value
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.
Examples
if (FALSE) { # \dontrun{
# 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))
} # }