unif_grad_simp: This is me being very careful about calculating the gradient...

Description Usage Arguments Value

Description

This is me being very careful about calculating the gradient of the likelihood function wrt Z.

Usage

1
2
3
unif_grad_simp(pi_Z, lambda, alpha, Y, sig_diag, left_seq = NULL,
  right_seq = NULL, a_seq = NULL, b_seq = NULL, var_scale = TRUE,
  likelihood = c("normal", "t"), df = NULL)

Arguments

pi_Z

A vector. The first M values are the current values of π. The last k values are the current values of Z.

lambda

A vector. This is a length M vector with the regularization parameters for the mixing proportions.

alpha

A matrix. This is of dimension p by k and are the coefficients to the confounding variables.

Y

A matrix of dimension p by 1. These are the observed regression coefficients of the observed variables.

sig_diag

A vector of length p containing the variances of the observations.

left_seq

The left endpoints of the uniforms.

right_seq

The right endpoints of the uniforms

a_seq

A vector of negative numerics containing the left endpoints of the mixing uniforms.

b_seq

A vector of positiv numerics containing the right endpoints of the mixing uniforms.

var_scale

A logical. Should we update the scaling on the variances (TRUE) or not (FALSE).

likelihood

Can be "normal" or "t".

df

A positive numeric. The degrees of freedom if the likelihood is t.

Value

The gradient for Z.


dcgerard/succotashr documentation built on May 15, 2019, 1:25 a.m.