Description Usage Arguments Details Value
Fits the heavy-tailed linear regression model y_i~N(x_i'beta,v_i), v_i~inv-chi^2(nu,sigma2) β~N(mu0,Sigma_0) sigma2~IG(a0,b0).
1 2 3 4 5 6 7 8 9 10 11 12 13 | bayesTdistLm(
y,
X,
mu0,
Sigma0,
a0,
b0,
parInit = NULL,
nu,
nkeep = 10000,
nburn = 1000,
rwTune = NULL
)
|
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 |
b0 |
prior scale parameter for σ^2 |
parInit |
vector of initial values for β, σ^2. Default is |
nu |
degrees of freedom for t-distribution - assumed fixed |
nkeep |
number of iterations to keep |
nburn |
number of iterations to toss |
rwTune |
tuning parameter for the Metropolis-Hastings random walk used to sample σ^2 |
Uses Gibbs sampling to sample from the posterior under the above linear regression model. This model is equivalent to a linear regression with t-distributed errors.
list with mcmc sample, mean fitted values, and logical acceptance vector for σ^2 proposals.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.