sample_params_mean | R Documentation |
Sample the parameters for the model y ~ N(mu0, sigma^2) with a flat prior on mu0 and sigma ~ Unif(0, A).
sample_params_mean(y, params)
y |
|
params |
the named list of parameters containing
|
The updated named list params
with draws from the full conditional distributions
of sigma
and coefficients
(and updated mu
).
The only parameter in coefficients
is mu0
.
Although redundant here, this parametrization is useful in other functions.
# Example:
y = 1:10
params0 = init_params_mean(y)
params = sample_params_mean(y = y, params = params0)
names(params)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.