Runs a few newton steps to update Z given scale_val.
1 2 3 | unif_update_z(Y, sig_diag, alpha, lambda, a_seq, b_seq, pi_new, Tkj, Z_old,
llike_old, tol = 10^-3, newt_itermax = 10, print_ziter = FALSE,
scale_val = 1)
|
Y |
A matrix of dimension |
sig_diag |
A vector of length |
alpha |
A matrix. This is of dimension |
lambda |
A vector. This is a length |
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. |
pi_new |
A vector of numerics. The current estimates of of the mixing proportions. |
Tkj |
A matrix of numerics. The T matrix. |
Z_old |
A vector of numerics. The old confounders. |
llike_old |
The old log-likelihood |
tol |
A positive numeric. The stopping criterion for Newton's method in updating Z. |
newt_itermax |
A positive integer. The maximum number of Newton steps to perform in updating Z. |
print_ziter |
A logical. Should we we print each iteration of the Z optimization? |
scale_val |
A positive numeric. The variance inflation parameter. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.