spike.slab.glm.prior: Zellner Prior for Glm's.

spike.slab.glm.priorR Documentation

Zellner Prior for Glm's.

Description

A Zellner-style spike and slab prior for generalized linear models. It is intended as a base class for LogitZellnerPrior, PoissonZellnerPrior, and potential future extensions.

Usage

SpikeSlabGlmPrior(
    predictors,
    weight,
    mean.on.natural.scale,
    expected.model.size,
    prior.information.weight,
    diagonal.shrinkage,
    optional.coefficient.estimate,
    max.flips,
    prior.inclusion.probabilities)

SpikeSlabGlmPriorDirect(
    coefficient.mean,
    coefficient.precision,
    prior.inclusion.probabilities = NULL,
    expected.model.size = NULL,
    max.flips = -1)

Arguments

predictors

The design matrix for the regression problem. No missing data is allowed.

weight

A vector of length nrow(predictors) giving the prior weight assigned to each observation in predictors. This should ideally match the weights from the Fisher information (e.g. p * (1-p)) for logistic regression, or lambda for Poisson regression, but that depends on the model, so a typical thing to do is to set all the weights the same.

mean.on.natural.scale

Used to set the prior mean for the intercept. The mean of the response, expressed on the natural scale. This is logit(p-hat) for logits and log(ybar) for Poissons.

expected.model.size

A positive number less than ncol(x), representing a guess at the number of significant predictor variables. Used to obtain the 'spike' portion of the spike and slab prior.

prior.information.weight

A positive scalar. Number of observations worth of weight that should be given to the prior estimate of beta.

diagonal.shrinkage

The conditionally Gaussian prior for beta (the "slab") starts with a precision matrix equal to the information in a single observation. However, this matrix might not be full rank. The matrix can be made full rank by averaging with its diagonal. diagonal.shrinkage is the weight given to the diaonal in this average. Setting this to zero gives Zellner's g-prior.

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

max.flips

The maximum number of variable inclusion indicators the sampler will attempt to sample each iteration. If negative then all indicators will be sampled.

prior.inclusion.probabilities

A vector giving the prior probability of inclusion for each variable. If NULL then a default set of probabilities is obtained by setting each element equal to min(1, expected.model.size / ncol(x)).

coefficient.mean

The prior mean of the coefficients in the maximal model (with all coefficients included).

coefficient.precision

The prior precision (inverse variance) of the coefficients in the maximal model (with all coefficients included).

Details

A Zellner-style spike and slab prior for generalized linear models. Denote the vector of coefficients by \beta, and the vector of inclusion indicators by \gamma. These are linked by the relationship \beta_i \ne 0 if \gamma_i = 1 and \beta_i = 0 if \gamma_i = 0. The prior is

\beta | \gamma \sim N(b, V)

\gamma \sim B(\pi)

where \pi is the vector of prior.inclusion.probabilities, and b is the optional.coefficient.estimate. Conditional on \gamma, the prior information matrix is

V^{-1} = \kappa ((1 - \alpha) x^Twx / n + \alpha diag(x^Twx / n))

The matrix x^Twx is, for suitable choice of the weight vector w, the total Fisher information available in the data. Dividing by n gives the average Fisher information in a single observation, multiplying by \kappa then results in \kappa units of "average" information. This matrix is averaged with its diagonal to ensure positive definiteness.

In the formula above, \kappa is prior.information.weight, \alpha is diagonal.shrinkage, and w is a diagonal matrix with all elements set to prior.success.probability * (1 - prior.success.probability). The vector b and the matrix V^{-1} are both implicitly subscripted by \gamma, meaning that elements, rows, or columsn corresponding to gamma = 0 should be omitted.

The "Direct" version is intended for situations where the predictors are unavailable, or if the user wants more control over the prior precision matrix.

Value

Returns an object of class SpikeSlabGlmPrior, which is a list with data elements encoding the selected prior values.

This object is intended for use as a base class for LogitZellnerPrior and PoissonZellnerPrior.

Author(s)

Steven L. Scott

References

Hugh Chipman, Edward I. George, Robert E. McCulloch, M. Clyde, Dean P. Foster, Robert A. Stine (2001), "The Practical Implementation of Bayesian Model Selection" Lecture Notes-Monograph Series, Vol. 38, pp. 65-134. Institute of Mathematical Statistics.


BoomSpikeSlab documentation built on May 29, 2024, 5:07 a.m.