! covariance structure for 3 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 10 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 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 !Proportion of total phenotypic variance R = (Q*Q')@Y + (E*E')@(U@I) + (A*A')@(U@B) ; !R=(E*E')@(U@I); x=A|Q|E; End Algebra; Option mxx=mix.mat option append option format=(7(F13.6,1x)) End group Title QTL model 4sibs weighted likelihood Data NInput=6 NModel=ncomb RECTANGULAR FILE=mxgh2.rec ! READ IN IBD WEIGHTS FOR THE 3 SIBSHIP TYPES LABELS famid p1 p2 Z1 Z2 Z3 SELECT p1 p2 Z1 Z2 Z3 / DEFINITION Z1 Z2 Z3 / Matrices; R computed = R1 N Unit ncomb 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; End Algebra; Means N@M; Covariance R ; Weights z; Option Rsiduals !start 2 q 1 1 1 start 1 E 1 1 1 !all Start 0 M 2 1 1 !Interval q 1 1 1 Option nd=4 Option multiple it=1000 option samecov issat End drop @.0 q 1 1 1 end