Calculates the standard errors for predictions Du^, see Welham et al. 2004 and Gilmour et al. 2004 for details.
calcStandardErrors(C, D)
Arguments
C: a symmetric matrix of class spam
D: a matrix of class spam
Returns
a vector with standard errors for predictions Du^.
Details
The prediction error variance is given by DC−1D′, where C is the mixed model coefficient matrix, and D defines linear combinations of fixed and random effects. The standard errors are given by the the square root of the diagonal. To calculate the standard errors in an efficient way we use that
where di is row i of matrix D. The values of di′C−1di can be calculated more efficient, avoiding the calculation of the inverse of C, by using Automated Differentiation of the Choleksy algorithm, see section 2.3 in Smith (1995) for details.
References
Welham, S., Cullis, B., Gogel, B., Gilmour, A., & Thompson, R. (2004). Prediction in linear mixed models. Australian & New Zealand Journal of Statistics, 46(3), 325-347.
Smith, S. P. (1995). Differentiation of the Cholesky algorithm. Journal of Computational and Graphical Statistics, 4(2), 134-147.
Gilmour, A., Cullis, B., Welham, S., Gogel, B., & Thompson, R. (2004). An efficient computing strategy for prediction in mixed linear models. Computational statistics & data analysis, 44(4), 571-586.