When a random factor contains many multiple levels, the code currently slows due to the for loops used in the calculation of the covariance of dl/dDk and dl/dsigma, covariance of dl/dDk1 and dl/Dk2 and dl/dD itself. This can be resolved using matrix reshapes.
When a random factor contains many multiple levels, the code currently slows due to the for loops used in the calculation of the covariance of dl/dDk and dl/dsigma, covariance of dl/dDk1 and dl/Dk2 and dl/dD itself. This can be resolved using matrix reshapes.