How to compute the average variance of a

advertisement
How to compute the average variance of a difference from the variance-covariance
matrix of adjusted means
Let m be the vector of adjusted means and let Vm be the estimate of var m , the variancecovariance matrix of adjusted means. Let D be a contrast matrix with n columns and
nn  1 / 2 rows that generates all pairwise differences. For example, when n  4 we have
1 1 0 0 


1 0 1 0 
1 0
0  1

.
D
0 1 1 0 
0 1
0  1

 0 0 1  1


The variance-covariance matrix of all pairwise differences, d  Dm is given by
Vd  DVm DT .
This matrix has variances of all pairwise differences along the diagonal. So the mean variance
of a difference is
vd 


2
trace DVm DT .
nn  1
To evaluate the trace, it is helpful to exploit the fact that




trace DVm DT  trace Vm DT D .
Moreover, we have DT D  nI n  1n1Tn , where I n is the n-dimensional identity matrix and 1n is
an n-vector of ones. Thus,






trace DVm DT  trace Vm DT D  n  traceVm   trace Vm1n1Tn  n  traceVm   1nVm1Tn .
The second quantity on the right-hand side of the above equation, 1n Vm1Tn is the sum of all the
elements of Vm . The average variance of a difference can thus be computed as
vd 


2
n  traceVm   1nVm1Tn [1].
nn  1
References
1. de S. Bueno FJ S, Gilmour SG: Planning Incomplete Block Experiments When
Treatments Are Genetically Related. Biometrics 2003, 59: 375–381.
Download