mouthwash_coordinate: Coordinate ascent for optimizing t likelihood with uniform...

Description Usage Arguments Author(s)

View source: R/mouthwash_uniform_coordinate.R

Description

Set degrees_freedom = Inf if you want to use a normal likelihood.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
mouthwash_coordinate(
  pi_init,
  z_init,
  xi_init,
  betahat_ols,
  S_diag,
  alpha_tilde,
  a_seq,
  b_seq,
  lambda_seq,
  degrees_freedom,
  scale_var = TRUE,
  tol = 10^-6,
  maxit = 100,
  plot_update = FALSE,
  var_inflate_pen = 0
)

Arguments

pi_init

The initial values of the mixing proportions. A numeric vector of positive values that sum to one.

z_init

The initial values of z2. A numeric vector.

xi_init

The initial (or known) value of the variance inflation term.

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.

a_seq

The grid of lower bounds for the uniforms if mixing_dist is one of the uniforms.

b_seq

The grid of upper bounds for the uniforms if mixing_dist is one of the uniforms.

lambda_seq

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

degrees_freedom

The degrees of freedom of the t-distribution if likelihood = "t".

scale_var

A logical. Should we estimate a variance inflation parameter (TRUE) or not (FALSE)?

tol

The tolerance for the stopping condition.

maxit

The maximum number of iterations to run in the optimization scheme.

plot_update

A logical. Should I plot the the path of the log-likelihood (TRUE) or not (FALSE)?

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.