succotash_given_alpha: Maximize the SUCCOTASH log-likelihood and return posterior...

Description Usage Arguments Details Value See Also

Description

This function runs succotash_em repetitively, keeping the highest local mode. It then returns posterior summaries.

Usage

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"))

Arguments

Y

A matrix of dimension p by 1. These are the observed regression coefficients of the observed variables.

alpha

A matrix. This is of dimension p by k and are the coefficients to the confounding variables.

sig_diag

A vector of length p containing the variances of the observations.

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 M containing the standard deviations (not variances) of the mixing distributions.

em_pi_init

A vector of length M containing the starting values of π. If NULL, then one of three options are implemented in calculating pi_init based on the value of pi_init_type.

lambda

A vector. This is a length M vector with the regularization parameters for the mixing proportions. If NULL then refer to lambda_type.

em_Z_init

A k by 1 matrix. These are the initial values of the unobserved covariates. If its value is NULL, then each element of Z_init will be drawn from a mean zero normal with standard deviation z_start_sd.

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 Z_init is NULL, then the starting values for Z are drawn from a mean zero normal with standard devation z_start_sd.

lambda_type

If lambda is NULL, then how should we choose the regularization parameters. Two options are available. If lambda_type is "zero_conc", then lambda[1] = 10 and lambda[2:M] = 1. If lambda_type is "ones" then lambda = 1.

lambda0

If lambda_type = "zero_conc", then lambda0 is the amount to penalize pi0.

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 (TRUE) or not (FALSE).

optmethod

Should we use coordinate ascent (optmethod = "coord") or an EM algorithm (optmethod = "em").

z_init_type

How should we initiate the confounders? At the all-null MLE ("null_mle") or from iid standard normals ("random")?

var_scale_init_type

If var_scale = TRUE, how should we initiate the variance inflaiton parameter? From the all-null MLE ("null_mle"), at no inflation ("one"), or from a chi-squared distribution with one degree of freedom ("random")?

Details

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.

Value

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.

See Also

succotash_em, succotash_summaries.


dcgerard/succotashr documentation built on May 15, 2019, 1:25 a.m.