#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
  
