ebnm_flat: Solve the EBNM problem using a flat prior

View source: R/ebnm_fns.R

ebnm_flatR Documentation

Solve the EBNM problem using a flat prior

Description

Solves the empirical Bayes normal means (EBNM) problem using a "non-informative" improper uniform prior, which yields posteriors

\theta_j | x_j, s_j \sim N(x_j, s_j^2).

Identical to function ebnm with argument prior_family = "flat". For details about the model, see ebnm.

Usage

ebnm_flat(
  x,
  s = 1,
  g_init = NULL,
  fix_g = FALSE,
  output = ebnm_output_default()
)

Arguments

x

A vector of observations. Missing observations (NAs) are not allowed.

s

A vector of standard errors (or a scalar if all are equal). Standard errors may not be exactly zero, and missing standard errors are not allowed.

g_init

Not used by ebnm_flat, but included for consistency with other ebnm functions.

fix_g

Not used by ebnm_flat, but included for consistency with other ebnm functions.

output

A character vector indicating which values are to be returned. Function ebnm_output_default() provides the default return values, while ebnm_output_all() lists all possible return values. See Value below.

Value

An ebnm object. Depending on the argument to output, the object is a list containing elements:

data

A data frame containing the observations x and standard errors s.

posterior

A data frame of summary results (posterior means, standard deviations, second moments, and local false sign rates).

fitted_g

The fitted prior \hat{g}.

log_likelihood

The optimal log likelihood attained, L(\hat{g}).

posterior_sampler

A function that can be used to produce samples from the posterior. The sampler takes a single parameter nsamp, the number of posterior samples to return per observation.

S3 methods coef, confint, fitted, logLik, nobs, plot, predict, print, quantile, residuals, simulate, summary, and vcov have been implemented for ebnm objects. For details, see the respective help pages, linked below under See Also.

See Also

See ebnm for examples of usage and model details.

Available S3 methods include coef.ebnm, confint.ebnm, fitted.ebnm, logLik.ebnm, nobs.ebnm, plot.ebnm, predict.ebnm, print.ebnm, print.summary.ebnm, quantile.ebnm, residuals.ebnm, simulate.ebnm, summary.ebnm, and vcov.ebnm.


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