Description Usage Arguments Value
View source: R/fn_random_effects.R
Fits the random effects model using standard Gibbs Sampling μ ~ N(μ_0, σ^2_0); τ^2 ~ IG(α_t, β_t) θ_j~N(μ, τ^2), j = 1,2,...,J; σ^2~IG(α_s, β_s), y_{ij}~N(θ_j), σ^2), i = 1,2,...,n_j
1 2 3 4 5 6 7 8 9 10 11 | re_model(
Y,
mu_0,
sigma2_0,
alpha_t,
beta_t,
alpha_s,
beta_s,
nkeep = 1000,
nburn = 1000
)
|
Y |
list; jth element is a vector of the y_ij |
mu_0, sigma2_0 |
prior mean and variance for μ |
alpha_t, beta_t |
prior shape and scale for τ^2 |
alpha_s, beta_s |
prior shape and scale for σ^2 |
nkeep |
number of iterations to keep |
nburn |
number of iterations to toss |
list with mcmc sample and mean fitted values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.