Learn R Programming

SignalY (version 1.1.1)

select_by_credible_interval: Select Variables Based on Credible Intervals

Description

Robust variable selection method using posterior credible intervals. A variable is selected if its credible interval excludes zero, indicating a statistically meaningful effect. This method is more robust than kappa-based selection when the global shrinkage parameter tau collapses.

Usage

select_by_credible_interval(hs_fit, prob = 0.95, verbose = FALSE)

Value

List with selected variable names and details.

Arguments

hs_fit

Object returned by fit_horseshoe.

prob

Probability level for the credible interval. Default 0.95 uses the 95% credible interval (2.5% to 97.5% quantiles).

verbose

Logical for messages.

Details

This function selects variables whose posterior credible interval does not include zero. This is analogous to checking if a confidence interval excludes zero in frequentist statistics, but with a Bayesian interpretation.

The method is particularly useful when:

  • The kappa-based selection returns no variables

  • The posterior tau is very small (< 0.05)

  • You want a more interpretable selection criterion

See Also

select_by_shrinkage for kappa-based selection.

Examples

Run this code
if (FALSE) {
hs_fit <- fit_horseshoe(y, X, p0 = 5)
selected <- select_by_credible_interval(hs_fit, prob = 0.95, verbose = TRUE)
print(selected$selected)
}

Run the code above in your browser using DataLab