spike.slab.ar.prior {bsts}R Documentation

Spike and Slab Priors for AR Processes

Description

Returns a spike and slab prior for the parameters of an AR(p) process.

Usage

SpikeSlabArPrior(
    lags,
    prior.inclusion.probabilities =
        GeometricSequence( lags, initial.value = .8, discount.factor = .8),
    prior.mean = rep(0, lags),
    prior.sd =
        GeometricSequence(lags, initial.value = .5, discount.factor = .8),
    sdy,
    prior.df = 1,
    expected.r2 = .5,
    sigma.upper.limit = Inf,
    truncate = TRUE)

Arguments

lags

A positive integer giving the maximum number of lags to consider.

prior.inclusion.probabilities

A vector of length lags giving the prior probability that the corresponding AR coefficient is nonzero.

prior.mean

A vector of length lags giving the prior mean of the AR coefficients. This should almost surely stay set at zero.

prior.sd

A vector of length lags giving the prior standard deviations of the AR coefficients, which are modeled as a-priori independent of one another.

sdy

The sample standard deviation of the series being modeled.

expected.r2

The expected fraction of variation in the response explained by this AR proces.

prior.df

A positive number indicating the number of observations (time points) worth of weight to assign to the guess at expected.r2.

sigma.upper.limit

A positive number less than infinity truncates the support of the prior distribution to regions where the residual standard deviation is less than the specified limit. Any other value indicates support over the entire positive real line.

truncate

If TRUE then the support of the distribution is truncated to the region where the AR coefficients imply a stationary process. If FALSE the coefficients are unconstrained.

Value

A list of class SpikeSlabArPrior containing the information needed for the underlying C++ code to instantiate this prior.

Author(s)

Steven L. Scott steve.the.bayesian@gmail.com


[Package bsts version 0.9.6 Index]