Description Usage Arguments Details Value See Also Examples
The main function in the stramash package is
stramash
, which should be examined for more
details. For simplicity only the most commonly-used options are
documented under stramash
. For expert or
interested users the documentation for function
stramash.workhorse
provides documentation on all
implemented options.
Takes vectors of estimates (betahat
) and their
standard errors (sebetahat
) or a list of mixture error
distributions (errordist
), and applies shrinkage to
them, using Empirical Bayes methods, to compute shrunk
estimates for beta.
1 2 3 |
betahat |
a p vector of estimates |
errordist |
A list of objects of either class
|
sebetahat |
a p vector of corresponding standard errors |
likelihood |
One of the pre-specified likelihoods
available. So far, they are |
mixcompdist |
distribution of components in mixture
( |
df |
appropriate degrees of freedom for (t) distribution of
betahat/sebetahat if |
... |
Further arguments to be passed to
|
This function is actually just a simple wrapper that
passes its parameters to stramash.workhorse
which
provides more documented options for advanced use. See
README.md for more details.
stramash returns an object of class
"ash
", a list with some or all of the following elements
(determined by outputlevel)
fitted.g |
fitted mixture, either a normalmix or unimix |
loglik |
log P(D|mle(pi)) |
logLR |
log[P(D|mle(pi))/P(D|beta==0)] |
PosteriorMean |
A vector consisting the posterior mean of beta from the mixture |
PosteriorSD |
A vector consisting the corresponding posterior standard deviation |
PositiveProb |
A vector of posterior probability that beta is positive |
NegativeProb |
A vector of posterior probability that beta is negative |
ZeroProb |
A vector of posterior probability that beta is zero |
lfsr |
The local false sign rate |
lfdr |
A vector of estimated local false discovery rate |
qvalue |
A vector of q values |
call |
a call in which all of the specified arguments are specified by their full names |
excludeindex |
the vector of index of observations with 0 standard error; if none, then returns NULL |
model |
either "EE" or "ET", denoting whether exchangeable effects (EE) or exchangeable T stats (ET) has been used |
optmethod |
the optimization method used |
data |
a list consisting the input betahat and sebetahat (only included if outputlevel>2) |
stramash.workhorse
for complete specification of
stramash function
1 2 3 4 5 6 7 | beta = c(rep(0, 100), stats::rnorm(100))
sebetahat = abs(stats::rnorm(200, 0, 1))
betahat = stats::rnorm(200, beta, sebetahat)
beta.stramash = stramash.workhorse(betahat = betahat, sebetahat = sebetahat)
summary(beta.stramash)
names(beta.stramash)
graphics::plot(betahat, beta.stramash$PosteriorMean, xlim = c(-4, 4), ylim = c(-4, 4))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.