Description Usage Arguments Details Value
Fits the linear regression model β~N(μ_0, Σ_0), σ^2~IG(a0, b0), y~N(Xβ, σ^2 I)
1 | bayesLm(y, X, mu0, Sigma0, a0, b0, sigma2Int, nkeep = 10000, nburn = 1000)
|
y |
vector of repsonse |
X |
design matrix for regression. If intercept is desired, a column of 1's is needed |
mu0 |
prior mean for beta |
Sigma0 |
prior var-cov matrix for β |
a0 |
prior shape parameter for σ^2 |
nkeep |
number of iterations to keep |
nburn |
number of iterations to toss |
a0, b0 |
prior scale parameter for σ^2 |
sigma2Init |
initial value for σ^2 in MCMC |
Uses Gibbs sampling to sample from the posterior under the above linear regression model.
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.