Description Usage Arguments Details Value
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 marginal likelihood over Z and π.
1 2 3 4 5 6 7 | succotash_em(Y, alpha, sig_diag, tau_seq = NULL, pi_init = NULL,
lambda = NULL, Z_init = NULL, itermax = 1500, tol = 10^-6,
z_start_sd = 1, print_note = FALSE, pi_init_type = c("random",
"uniform", "zero_conc"), 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 |
tau_seq |
A vector of length |
pi_init |
A vector of length |
lambda |
A vector. This is a length |
Z_init |
A |
itermax |
An integer. The maximum number of fixed-point iterations to run the EM algorithm. |
tol |
A numeric. The stopping criterion is the absolute difference of the ratio of subsequent iterations' log-likelihoods from 1. |
z_start_sd |
A positive numeric. If |
print_note |
Should we print that we're doing an EM? |
pi_init_type |
How should we choose the initial values of
π. Possible values of |
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 ( |
This function uses the SQUAREM
package with fixed point
iteration succotash_fixed
to run the EM. There can be a lot
of local modes, so this function should be run at many starting
locations.
pi_vals
A vector of length M
. The estimates
of the mixing proportions.
Z
A matrix of dimension k
by 1
. The
estimates of the confounder covariates.
llike
A numeric. The final value of the SUCCOTASH
log-likelihood.
tau_seq
A vector of length M
. The standard
deviations (not variances) of the mixing distribution.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.