bayesModel.fit: Bayesian regression model with mixture of two scaled inverse
chi square as hyperprior distribution.
Description
Performs Gibbs Sampling algorithm for fitting the
Bayesian regression model with mixture of two scaled inverse
chi square as hyperprior distribution for variance of each regression
coefficients.
the degree of freedom hyperparameter(s) nu0 for all mixture components.
s0
the scale hyperparameter(s) s0 for all mixture components.
niter
the number of iterations of Gibbs Sampling algorithm.
burnin
the number of 'burn in' in a Gibbs Sampling algorithm.
type
it is a string which if were defined as ``ridge'' the function performs
Bayesian ridge regression, otherwise, Bayes H model.
Value
BayesH that contains the
posterior distribution of intercept, posterior distribution of variance error,
posterior mean of regression coefficients and posterior mean of predicted values.
Details
For bayesian ridge regression (type == "ridge"), the prior distribution for the error
variance and the hyperprior distribution for variance of the regression coefficients
follows scaled inverse chi square with same hyperparameters (nu0[1], s0[1])
and (nu0[2], s0[2]), respectively.On the other hand, for hierarchical regression
model (type == "bayesH") is assumed that each the regression coefficient has different variance
and each one of them follows a mixture of scaled inverse chi square with hyperparameters
(nu0[1]; s0[1]) and (nu0[2]; s0[2]), respectively.
In this case, the prior distribution for error variance also follows scaled inverse
chi square with hyperparameters nu0[3] and s0[3]. NA's in the incidence
matrix are not allowed. All elements of vector s0 must be greater than zero.