succotash_fixed: A fixed-point iteration of the EM algorithm.

Description Usage Arguments Value

Description

This is a fixed-point iteration for the SUCCOTASH EM algorithm. This updates the estimte of the prior and the estimate of the hidden covariates.

Usage

1
2
succotash_fixed(pi_Z, lambda, alpha, Y, tau_seq, sig_diag,
  plot_new_ests = FALSE, var_scale = TRUE)

Arguments

pi_Z

A vector. The first M values are the current values of π. The last k values are the current values of Z.

lambda

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

alpha

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

Y

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

tau_seq

A vector of length M containing the standard deviations (not variances) of the mixing distributions.

sig_diag

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

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

Value

pi_Z_new A vector of numerics. The first M of which are the new pi values and the last k of which are the new Z values (if var_scale = FALSE). If var_scale = TRUE then the last element is actually the new variance inflation parameter.


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