prior_spike_slab: Specify a spike-and-slab prior for variable selection

View source: R/priors.R

prior_spike_slabR Documentation

Specify a spike-and-slab prior for variable selection

Description

Used with smoothbp_ss() to place a point-mass spike at zero on selected coefficients.

Usage

prior_spike_slab(
  pi = 0.5,
  slab = prior_normal(0, 2),
  learn_pi = FALSE,
  a = 1,
  b = 1
)

Arguments

pi

Prior inclusion probability. Default 0.5.

slab

A prior_normal() object for the slab component.

learn_pi

Logical; if TRUE, place a Beta(a, b) hyperprior on pi.

a

Shape parameter for the Beta hyperprior. Default 1.

b

Shape parameter for the Beta hyperprior. Default 1.

Value

A smoothbp_spike_slab object.


smoothbp documentation built on June 14, 2026, 9:06 a.m.