epinowcast
|
Go to the source code of this file.
Functions | |
void | effect_priors_lp (vector beta, vector beta_sd, array[,] real beta_sd_p, int fixed, int random) |
void effect_priors_lp | ( | vector | beta, |
vector | beta_sd, | ||
array real | beta_sd_p[,], | ||
int | fixed, | ||
int | random | ||
) |
Specify priors for regression effects
This function sets priors for the regression effects and their standard deviations. It allows for the specification of both fixed and random effects, with the option to apply a normal distribution to the standard deviations of the random effects.
beta | Vector of regression effects. |
beta_sd | Vector of standard deviations for the regression effects. |
beta_sd_p | Parameters for the normal prior on beta_sd. The first row indicates the mean, and the second row the standard deviation. |
fixed | Binary flag indicating if fixed effect priors are to be set (1) or not (0). |
random | Binary flag indicating if random effect priors are to be set (1) or not (0). |
fixed
is true, a standard normal prior is applied to beta
.fixed
and random
are true, a normal prior is applied to beta_sd
, with parameters specified in beta_sd_p
. This allows for flexible prior specification depending on the nature of the regression effects being modeled. Definition at line 29 of file effects_priors_lp.stan.