confint.ebnm: Obtain credible intervals using a fitted EBNM model

View source: R/ebnm_methods.R

confint.ebnmR Documentation

Obtain credible intervals using a fitted EBNM model

Description

The confint method for class ebnm. Estimates posterior "credible intervals" for each "true mean" \theta_i. We define the (1 - \alpha)% credible interval for \theta_i as the narrowest continuous interval [a_i, b_i] such that \theta_i \in [a_i, b_i] with posterior probability at least 1 - \alpha, where \alpha \in (0,1). We estimate these credible intervals using Monte Carlo sampling. Note that by default, ebnm does not return a posterior sampler; one can be added to the ebnm object using function ebnm_add_sampler.

Usage

## S3 method for class 'ebnm'
confint(object, parm, level = 0.95, nsim = 1000, ...)

Arguments

object

The fitted ebnm object.

parm

A vector of numeric indices specifying which means \theta_i are to be given confidence intervals. If missing, all observations are considered.

level

The "confidence level" 1 - \alpha desired.

nsim

The number of samples to use to estimate confidence intervals.

...

Additional arguments to be passed to the posterior sampler function. Since ebnm_horseshoe returns an MCMC sampler, it takes parameter burn, the number of burn-in samples to discard. At present, no other samplers take any additional parameters.

Value

A matrix with columns giving lower and upper confidence limits for each mean \theta_i. These will be labelled as "CI.lower" and "CI.upper".


ebnm documentation built on Sept. 11, 2025, 1:07 a.m.