Description Usage Arguments Value Author(s)
View source: R/mouthwash_normal_em.R
A fixed point iteration for updating the mixing proportions and the confounders associated with the covariates of interest when using a mixture of normals prior.
1 2 3 4 5 6 7 8 9 10 11 12 | normal_mix_fix(
pi_vals,
z2,
xi,
betahat_ols,
S_diag,
alpha_tilde,
tau2_seq,
lambda_seq,
scale_var = TRUE,
var_inflate_pen = 0
)
|
pi_vals |
The current values of the mixing proportions. |
z2 |
The current value of the unobserved confounders corresponding to the covariates of interest. |
xi |
The current value of the variance inflation parameter. |
betahat_ols |
A vector of numerics. The OLS estimates of the coefficients of interest. |
S_diag |
A vector of positive numerics. The estimated standard errors. |
alpha_tilde |
A matrix. The number of rows should be equal the length of betahat_ols. The number of columns should equal the number of hidden confounders. |
tau2_seq |
The grid of variances. This is the same thing as
grid_seq in |
lambda_seq |
A numeric vector with elements all greater than or equal to 1. These are the tuning parameters for the mixing proportions. |
scale_var |
Should we optimize over a variance inflation
parameter ( |
var_inflate_pen |
The penalty to apply on the variance inflation parameter.
Defaults to 0, but should be something non-zero when |
A list with the following elements.
pi_vals
: The update for pi_vals
.
z2
: The update for z2
.
xi
: The update for xi
.
David Gerard
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.