quantile.ebnm: Obtain posterior quantiles using a fitted EBNM model

View source: R/ebnm_methods.R

quantile.ebnmR Documentation

Obtain posterior quantiles using a fitted EBNM model

Description

The quantile method for class ebnm. Quantiles for posterior distributions \theta_i \mid x_i, s_i, g are estimated via sampling. 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'
quantile(
  x,
  probs = seq(0, 1, 0.25),
  names = TRUE,
  type = 7,
  digits = 7,
  nsim = 1000,
  ...
)

Arguments

x

The fitted ebnm object.

probs

numeric vector of probabilities with values in [0,1]. (Values up to ‘⁠2e-14⁠’ outside that range are accepted and moved to the nearby endpoint.)

names

logical; if true, the result has a names attribute. Set to FALSE for speedup with many probs.

type

An integer between 1 and 9 selecting one of the nine quantile algorithms detailed in quantile to be used.

digits

used only when names is true: the precision to use when formatting the percentages. In R versions up to 4.0.x, this had been set to max(2, getOption("digits")), internally.

nsim

The number of samples to use to estimate quantiles.

...

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 quantiles for each posterior \theta_i \mid x_i, s_i, g.


ebnm documentation built on Oct. 13, 2023, 1:16 a.m.