normal_mix_llike: Penalized MOUTHWASH likelihood when using a mixture of...

Description Usage Arguments Author(s)

View source: R/mouthwash_normal_em.R

Description

Penalized MOUTHWASH likelihood when using a mixture of normals.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
normal_mix_llike(
  pi_vals,
  z2,
  xi,
  betahat_ols,
  S_diag,
  alpha_tilde,
  tau2_seq,
  lambda_seq,
  var_inflate_pen = 0
)

Arguments

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 mouthwash_second_step if likelihood = "normal".

lambda_seq

A numeric vector with elements all greater than or equal to 1. These are the tuning parameters for the mixing proportions.

var_inflate_pen

The penalty to apply on the variance inflation parameter. Defaults to 0, but should be something non-zero when alpha = 1 and scale_var = TRUE.

Author(s)

David Gerard


dcgerard/vicar documentation built on July 7, 2021, 1:08 p.m.