! covariance structure for 4 sib-pairs - prog modified 06/11/2000 ! to form basic script for QTL scans ! using weighted likelihood approach / full ibd distribution ! of sib pairs ! QTL estimated by - heterogeneity model - ! the weighted likelihood of 36 covariance matrices ! global dimensions ! values of ncomb 2sibs = 3; 3sibs=10; 4sibs=36; 5sibs=136; ! 6sibs=528; 7sibs=2080 ;8sibs=8256; 9sibs=32896 #define nvar 1 #define nsib 2 #define ncomb 3 !(2**(2*nsib-3))+(2**(nsib-1))-(2**(nsib-2)) #define nconfig 6 !nsib*ncomb Title QTL model two group - DZ's calc NGroups=2 Matrices ! reads matrix Y of QTL coeficients for covariance matrix from external file ! residual familial and non specific environmental variance A Lower nvar nvar Free ! background A and/or C - residual familial E Lower nvar nvar Free ! random environment Q Full nvar 1 Free ! qtl effect Y Full nconfig nsib B Stan nsib nsib I Iden nsib nsib V Unit nsib nsib U unit ncomb 1 End matrices !dimensions of B nsib*nsib-((nsib^2-nsib)/2) Matrix B .5 Matrix Y File=ibdstr2.out Begin algebra; !Variances algebra R = I@(E*E') + B@(A*A') ; End Algebra; end group Title QTL model two group DZ's Data NInput=6 NModel=1 RECTANGULAR FILE=mxgh2.rec ! READ IN IBD WEIGHTS FOR THE 3 SIBSHIPS LABELS famid p1 p2 Z1 Z2 Z3 SELECT p1 p2 Z1 Z2 Z3 / DEFINITION Z1 Z2 Z3 / !SELECT p1 p2 p3 ; Matrices = Group 1; !R computed = R1 N Unit 1 nsib ! ibds for 2 sibs ! matrices for means model !M Full 1 nsib Free ! mean values M Full 1 1 Free Z Full 1 ncomb End Matrices; Specify Z -1 -2 -3; Begin algebra; P = (U'@I)*((Z'@V).Y) ; X = A|Q|E; End Algebra; Means N@M; Covariance R + P@(Q*Q'); Option Rsiduals Option mxx=pihat.mat option append option format=(7(F13.6,1x)) Start .7 all Start 0 M 2 1 1 !Interval q 1 1 1 !fix all Option nd=4 Option multiple it=1000 !Option mx%p=newpihat.plt !Option nag=10 db=1 Option issat End Drop q 1 1 1 End