1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#NGroups 1
#define nvar 3
Calculation of full D matrix, 3 phenotypes husband & wife
Calculation
Begin Matrices;
W Symm nvar nvar ! Covariance of wives' variables
H Symm nvar nvar ! Covariance of husbands' variables
M Full nvar nvar ! Covariance between husband & wife variables
End Matrices;
Matrix W
1
.4 .9
.3 .5 1.1
Matrix H
1.2
.42 1.
.3 .47 .9
Matrix M
.4 .1 .2
.05 .3 .12
.22 .11 .5
Begin Algebra;
D= W~*M*H~ ;
End Algebra;
End
! MATRIX D
! This is a computed FULL matrix of order 3 by 3
! [=W~*M*H~]
! 1 2 3
! 1 .42:2 -.2854 .1497
! 2 -.3471 .776: -.5237
! 3 .1361 -.48:8 .7829
|