Description Usage Arguments Details Value Examples
Takes vectors of estimates (betahat) and their standard errors (sebetahat), and applies shrinkage to them, using Empirical Bayes methods, to compute shrunk estimates for beta.
1 2 3 4 5 6 | mixash(betahat, sebetahat, df, pilik, method = c("shrink", "fdr"),
mixcompdist = c("normal", "uniform", "halfuniform"), lambda1 = 1,
lambda2 = 0, nullcheck = FALSE, randomstart = FALSE, pointmass = TRUE,
onlylogLR = FALSE, singlecomp = FALSE, SGD = TRUE,
prior = c("uniform", "nullbiased"), mixsd = NULL, gridmult = sqrt(2),
minimaloutput = FALSE, g = NULL, control = list())
|
betahat, |
a p vector of estimates |
sebetahat, |
a p vector of corresponding standard errors |
control |
A list of control parameters for the SQUAREM algorithm, default value is set to be control.default=list(K = 1, method=3, square=TRUE, step.min0=1, step.max0=1, mstep=4, kr=1, objfn.inc=1,tol=1.e-07, maxiter=5000, trace=FALSE). User may supply changes to this list of parameter, say, control=list(maxiter=10000,trace=TRUE) |
method: |
specifies how ash is to be run. Can be "shrinkage" (if main aim is shrinkage) or "fdr" (if main aim is to assess fdr or fsr) This is simply a convenient way to specify certain combinations of parameters: "shrinkage" sets pointmass=FALSE and prior="uniform"; "fdr" sets pointmass=TRUE and prior="nullbiased". |
mixcompdist: |
distribution of components in mixture ("normal", "uniform" or "halfuniform") |
lambda1: |
multiplicative "inflation factor" for standard errors (like Genomic Control) |
lambda2: |
additive "inflation factor" for standard errors (like Genomic Control) |
nullcheck: |
whether to check that any fitted model exceeds the "null" likelihood in which all weight is on the first component |
df: |
appropriate degrees of freedom for (t) distribution of betahat/sebetahat |
randomstart: |
bool, indicating whether to initialize EM randomly. If FALSE, then initializes to prior mean (for EM algorithm) or prior (for VBEM) |
pointmass: |
bool, indicating whether to use a point mass at zero as one of components for a mixture distribution |
onlylogLR: |
bool, indicating whether to use this function to get logLR. Skip posterior prob, posterior mean, lfdr... |
singlecomp: |
bool, indicating whether to use a single inverse-gamma distribution as the prior distribution of the variances |
SGD: |
bool, indicating whether to use the stochastic gradient descent method to fit the prior distribution of the variances |
unimodal: |
unimodal constraint for the prior distribution of the variances ("variance") or the precisions ("precision") |
prior: |
string, or numeric vector indicating Dirichlet prior on mixture proportions (defaults to "uniform", or 1,1...,1; also can be "nullbiased" 1,1/k-1,...,1/k-1 to put more weight on first component) |
mixsd: |
vector of sds for underlying mixture components |
gridmult: |
the multiplier by which the default grid values for mixsd differ by one another. (Smaller values produce finer grids) |
minimal_output: |
if TRUE, just outputs the fitted g and the lfsr (useful for very big data sets where memory is an issue) |
g: |
the prior distribution for beta (usually estimated from the data; this is used primarily in simulated data to do computations with the "true" g) |
See readme for more details
a list with elements fitted.g is fitted mixture logLR : logP(D|mle(pi)) - logP(D|null)
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.