normal_mix_llike_wrapper: Wrapper for 'normal_mix_llike' so that I can use it in...

Description Usage Arguments Author(s) See Also

View source: R/mouthwash_normal_em.R

Description

This returns the negative log-likelihood for SQUAREM to use.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
normal_mix_llike_wrapper(
  pizxi_vec,
  betahat_ols,
  S_diag,
  alpha_tilde,
  tau2_seq,
  lambda_seq,
  scale_var = TRUE,
  var_inflate_pen = 0
)

Arguments

pizxi_vec

A vector whose first M elements are pi_vals, next k elements are z2, and last element is xi.

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.

scale_var

Not used. Only included in the arguments for SQUAREM application.

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

See Also

normal_mix_llike


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