Gradient of function to optimize over Z in EM step.
| 1 | tgrad(Z_old, sig_diag, Y, alpha, Tkj, a_seq, b_seq, nu)
 | 
| Z_old | A vector of numerics. The current value of Z. | 
| sig_diag | A vector of length  | 
| Y | A matrix of dimension  | 
| alpha | A matrix. This is of dimension  | 
| Tkj | A matrix of numerics. The weights from pi_new. | 
| 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. | 
| nu | A positive numeric. The degrees of freedom of the t-distribution. | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.