spike.slab.prior.base {BoomSpikeSlab} | R Documentation |
Base class for spike and slab priors
Description
A base class for SpikeSlabPrior and SpikeSlabPriorBase to ensure that elements common to both classes are handled consistently. Users will not normally interact with this function.
Usage
SpikeSlabPriorBase(number.of.variables,
expected.r2 = .5,
prior.df = .01,
expected.model.size = 1,
optional.coefficient.estimate = NULL,
mean.y,
sdy,
prior.inclusion.probabilities = NULL,
sigma.upper.limit = Inf)
Arguments
number.of.variables |
The number of columns in |
expected.r2 |
The expected R-square for the regression. The spike and slab prior
requires an inverse gamma prior on the residual variance of the
regression. The prior can be parameterized in terms of a guess at
the residual variance, and a "degrees of freedom" representing the
number of observations that the guess should weigh. The guess at
sigma^2 is set to |
prior.df |
A positive scalar representing the prior 'degrees of freedom' for
estimating the residual variance. This can be thought of as the
amount of weight (expressed as an observation count) given to the
|
expected.model.size |
A positive number less than
|
optional.coefficient.estimate |
If desired, an estimate of the
regression coefficients can be supplied. In most cases this will be
a difficult parameter to specify. If omitted then a prior mean of
zero will be used for all coordinates except the intercept, which
will be set to |
mean.y |
The mean of the response vector. Used to create a
default value of |
sdy |
The standard deviation of the response vector. Used along
with |
prior.inclusion.probabilities |
A vector giving the prior probability of inclusion for each coefficient. |
sigma.upper.limit |
The largest acceptable value for the residual
standard deviation. A non-positive number is interpreted as
|
Value
Returns an object of class SpikeSlabPriorBase
, which is a
list with the following elements.
prior.inclusion.probabilities: A vector giving the prior probability of inclusion for each coefficient.
mu: A vector giving the prior mean of each coefficient conditional on inclusion.
sigma.guess: A prior estimate of the residual standard deviation.
prior.df: The number of observations worth of weight to be given to
sigma.guess
.
Author(s)
Steven L. Scott
References
George and McCulloch (1997), "Approaches to Bayesian Variable Selection", Statistica Sinica, 7, 339 – 373.
https://www3.stat.sinica.edu.tw/statistica/oldpdf/A7n26.pdf