Description Usage Arguments Details Value Author(s) See Also Examples

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.

1 2 | ```
bayesModel.fit(X, y, nu0, s0, niter = 2000, burnin = 500, type="bayesH")
``` |

`X` |
the incidence |

`y` |
the vector of response variable of the model. |

`nu0` |
the degree of freedom hyperparameter(s) |

`s0` |
the scale hyperparameter(s) |

`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. |

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.

The output is an object of class `BayesH`

that contains the
posterior distribution of intercept, posterior distribution of variance error,
posterior mean of regression coefficients and posterior mean of predicted values.

Renato Rodrigues Silva, [email protected]

1 2 3 4 5 6 |

BayesH documentation built on May 29, 2017, 9:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.