fit_betamix: Fit a uniform-beta mixture to a distribution of p-values.

View source: R/fit_betamix.R

fit_betamixR Documentation

Fit a uniform-beta mixture to a distribution of p-values.

Description

Estimates the parameters of a uniform-beta mixture distribution, given some data. The mixture permits multiple betas and a single uniform distribution.

Usage

fit_betamix(
  p,
  n_boots = 1000,
  alpha = 0.01,
  n_cores = 1,
  subsample = 1,
  max_comp = 4,
  min_null = 0.4,
  opt_method = "L-BFGS-B",
  monotone = TRUE,
  ...
)

Arguments

p

A numeric vector of p-values

n_boots

A number providing the number of bootstraps used to calculate the convergence statistic.

alpha

A number representing the convergence criterion for formulating the mixture.

n_cores

A number representing the number of cores to use for the bootstrap calculation.

subsample

The proportion of p to subsample to calculate the beta mixture.

max_comp

A number representing the maximum number of non-uniform components to include in the mixture distribution.

min_null

The lower bound on the null distribution mixing fraction.

opt_method

Optimization method. Options are "L-BFGS-B" or "SANN".

monotone

Logical. Only use monotonically-decreasing beta components in the mixture model.

...

Additional parameters to be passed to bbmle::mle2. export


stevehoang/pbayes documentation built on Feb. 16, 2024, 2:20 p.m.