Description Usage Arguments Details Value See Also
This function runs succotash_em
repetitively, keeping
the highest local mode. It then returns posterior summaries.
1 2 3 4 5 6 7 | succotash_given_alpha(Y, alpha, sig_diag, num_em_runs = 2,
print_steps = FALSE, tau_seq = NULL, em_pi_init = NULL, lambda = NULL,
em_Z_init = NULL, em_itermax = 500, em_tol = 10^-6, em_z_start_sd = 1,
lambda_type = c("zero_conc", "ones"), lambda0 = 10,
plot_new_ests = FALSE, var_scale = TRUE, optmethod = c("coord", "em"),
z_init_type = c("null_mle", "random"), var_scale_init_type = c("null_mle",
"one", "random"))
|
Y |
A matrix of dimension |
alpha |
A matrix. This is of dimension |
sig_diag |
A vector of length |
num_em_runs |
How many times should we run the EM algorithm? |
print_steps |
A logical. Should we write the updates after each EM algorithm? |
tau_seq |
A vector of length |
em_pi_init |
A vector of length |
lambda |
A vector. This is a length |
em_Z_init |
A |
em_itermax |
An integer. The maximum number of fixed-point iterations to run the EM algorithm. |
em_tol |
A numeric. The stopping criterion is the absolute difference of the ratio of subsequent iterations' log-likelihoods from 1. |
em_z_start_sd |
A positive numeric. If |
lambda_type |
If |
lambda0 |
If |
plot_new_ests |
A logical. Should we plot the new estimates of pi? |
var_scale |
A logical. Should we update the scaling on the
variances ( |
optmethod |
Should we use coordinate ascent ( |
z_init_type |
How should we initiate the confounders? At the
all-null MLE ( |
var_scale_init_type |
If |
Let Y (p by 1) be multivariate normal with mean
β + α Z and diagonal covariance Σ, where
α and Σ are both known. If β is
assumed to be a mixture of normals with known variances and unknown
mixing proportions π (p by 1), then this
function will maximize the likelihood over Z and
π. It does this by running the EM algorithm implemented in
succotash_em
many times at different starting points.
The defaults are to run the first EM algorithm using the
"zero_conc"
option for pi_init_type
, then use the
"random"
option for every other EM run.
Z
A matrix of dimension k
by 1
. The
estimates of the confounder covariates.
pi_vals
A vector of length M
. The estimates of the
mixing proportions.
tau_seq
A vector of length M
. The standard
deviations (not variances) of the mixing distribution.
lfdr
(local false discovery rate) A vector of length
p
. The posterior probability that β_j = 0.
lfsr
(local false sign rate) A vector of length
p
. The posterior probability of making a sign error.
qvals
A vector of length p
. The q-values.
betahat
A vector of length p
. The posterior
estimates of β.
llike
The log-likelihood of the maximum likelihood
estimator.
null_llike
The log-likelihood of the maximum likelihood
estimator where the unimodal density is a point mass at 0.
succotash_em
,
succotash_summaries
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.