! GxE under Genetic Dominance ! Univariate ! Parents+Twins data on Anger x Education ! Note: Sex should be coded as 1=male and 0=females (no missings accepted) ! Note: The missing values on the moderator must have a different code e.g. -2 ! Boulder 2008, I.Rebollo G1:Define Matrices Data Calculation NGroups=3 Begin Matrices; A full 1 1 free !Additive genetic effects males D full 1 1 free !Non additive genetic effects males E full 1 1 free !Non-shared environment males T full 1 1 free !moderator-linked A component males U full 1 1 free !moderator-linked D component males V full 1 1 free !moderator-linked E component males X full 1 1 free !Additive genetic effects females Y full 1 1 free !Non additive genetic effects females Z full 1 1 free !Non-shared environment females O full 1 1 free !moderator-linked A component females P full 1 1 free !moderator-linked D component females Q full 1 1 free !moderator-linked E component females M full 1 4 free !Grand Means Males K full 1 4 free !Grand Mean Females B full 1 1 free !moderator effect on the means males N full 1 1 free !moderator effect on the means females S full 1 4 fix !Sex R full 1 4 fix !edu I unit 1 4 W Iden 4 4 fixed !Non-shared environment correlations end matrices; Begin Algebra; L = (S')@I; !Males in row C = (I-S)'@I; !Females in row End Algebra; Specify M 100 100 200 300 !Structure of the means for male pairs Specify K 400 400 200 300 !Structure of the means for female pairs Ma M 10 10 10 10 !Provide starting values Ma K 10 10 10 10 Ma A 1.5 Ma D 1.5 Ma E 1 Ma X 1.5 Ma Y 0.5 Ma Z 3 Ma T 0.01 Ma U 0.01 Ma V 0.01 Ma O 0.01 Ma P 0.01 Ma Q 0.01 Ma B 0.01 Ma N 0.01 !Options no_output End G2: MZ pairs Data NInput_vars=14 NObservations=0 Missing =-1 RE File=angerxed7.dat Labels famid zyg ang1 ang2 angf angm edu1 edu2 eduf edum sex1 sex2 sexf sexm Select if zyg < 4; !Select MZM and MZF Select if zyg ^= 2; Select ang1 ang2 angm angf edu1 edu2 eduf edum sex1 sex2 sexf sexm; Definition edu1 edu2 eduf edum sex1 sex2 sexf sexm; Matrices = Group 1; H full 4 4 fixed !Additive genetic correlations J full 4 4 fixed !Dominance genetic correlations End Matrices; Matrix H !1 for MZ pairs, .5 for parents-offspring 1 1 .5 .5 !and 0 for husband&wife 1 1 .5 .5 .5 .5 1 0 .5 .5 0 1 Matrix J !1 for MZ pairs and 0 for the rest 1 1 0 0 1 1 0 0 0 0 1 0 0 0 0 1 Specify S sex1 sex2 sexf sexm !Put covariates into matrices Specify R edu1 edu2 eduf edum Means ((M.S)+(K.(I-S)))+(B@S+N@(I-S)).R; !Main effect of the moderator on the means Covariance ( ( ((A@L+X@C)+(T@L+O@C).(R'@I)). !Additive genetic var-cov ((A@L'+X@C')+(T@L'+O@C').(R@I')) ). H )+ ( ( ((D@L+Y@C)+(U@L+P@C).(R'@I)). !Non-additive genetic var-cov ((D@L'+Y@C')+(U@L'+P@C').(R@I')) ). J )+ ( ( ((E@L+Z@C)+(V@L+Q@C).(R'@I)). !NSE var-cov ((E@L'+Z@C')+(V@L'+Q@C').(R@I')) ). W ); End G3: DZ pairs same sex Data NInput_vars=14 NObservations=0 Missing =-1 RE File=angerxed7.dat Labels famid zyg ang1 ang2 angf angm edu1 edu2 eduf edum sex1 sex2 sexf sexm Select if zyg < 5; !Select MZ pairs Select if zyg > 1; Select if zyg ^=3; Select ang1 ang2 angm angf edu1 edu2 eduf edum sex1 sex2 sexf sexm ; Definition edu1 edu2 eduf edum sex1 sex2 sexf sexm; Matrices = Group 1; H full 4 4 fixed !Additive genetic correlations J full 4 4 fixed !Dominance genetic correlations End matrices; Matrix H 1 .5 .5 .5 .5 1 .5 .5 .5 .5 1 0 .5 .5 0 1 Matrix J 1 .25 0 0 .25 1 0 0 0 0 1 0 0 0 0 1 Specify S sex1 sex2 sexf sexm Specify R edu1 edu2 eduf edum Means ((M.S)+(K.(I-S)))+(B@S+N@(I-S)).R; Covariance ( ( ((A@L+X@C)+(T@L+O@C).(R'@I)). ((A@L'+X@C')+(T@L'+O@C').(R@I')) ). H )+ ( ( ((D@L+Y@C)+(U@L+P@C).(R'@I)). ((D@L'+Y@C')+(U@L'+P@C').(R@I')) ). J )+ ( ( ((E@L+Z@C)+(V@L+Q@C).(R'@I)). ((E@L'+Z@C')+(V@L'+Q@C').(R@I')) ). W ); Option jiggle End