Boulder 2003 ! univariate Mx script for the analysis of one continuous phenotype ! using raw data input file ! MZM, DZM, MZF, DZF, DOSMF, DOSFM twins ! Evaluated models: ! 1. ACE males, ACE females, DOS A-correlation is not DZ A-correlation ! 2. ACE males, ACE females, DOS A-correlation = DZ A-correlation ! Mx homepage: http://views.vcu.edu/mx #define nvar 1 ! For every instance of the word nvar in the script, ! Mx reads 1. This corresponds to one phenotype to be analysed #define twonvar 1 ! twice nvar, used for calculation of means G1: calculation group Data Calc Begin matrices; X Lower nvar nvar Free ! MALES additive genetic path coefficient (standard deviation) Y Lower nvar nvar Free ! MALES common environmental path coefficient (standard deviation) Z Lower nvar nvar Fixed ! MALES unique environmental path coefficient (standard deviation) S Lower nvar nvar Free ! FEMALES additive genetic path coefficient (standard deviation) T Lower nvar nvar Free ! FEMALES common environmental path coefficient (standard deviation) U Lower nvar nvar Free ! FEMALES unique environmental path coefficient (standard deviation) H Full 1 1 fix ! .5 for dz cov A F Full 1 1 free ! free; for dos cov A End matrices; Matrix H .5 ! Matrix H is fixed and contains .5 Begin algebra; A= X*X' ; ! MALES additive genetic variance C= Y*Y' ; ! MALES common environmental variance E= Z*Z' ; ! MALES unique environmental variance K= S*S' ; ! FEMALES additive genetic variance L= T*T' ; ! FEMALES common environmental variance M= U*U' ; ! FEMALES unique environmental variance V = A%(A+C+E) | C%(A+C+E) | E%(A+C+E) _ !MALES FIRST ROW standardized variance components K%(K+L+M) | L%(K+L+M) | M%(K+L+M) ; !FEMALES SECOND ROW standardized variance components End algebra; st 1.5 X 1 1 1 ! provide starting values st 1.5 Y 1 1 1 st 1.5 Z 1 1 1 st 1.5 S 1 1 1 st 1.5 T 1 1 1 st 1.5 U 1 1 1 st 0.5 F 1 1 1 Bound 0 0.5 F 1 1 1 end G2: MZM twins, datagroup Data NInput_vars= 12 ! nr of inputvars per family Missing=-1.00 ! missing values = -1.00 REctangular file=all.dat ! read in raw datafile, must be in same directory LABELS ! tell Mx what is found in the datafile nih_id country zygot6 rear ageA sexA ldllnA apoblnA apoelnA ageB sexB ldllnB apoblnB apoelnB Select if country = 1 ; ! select Dutch twins, younger sample (Dorret) Select if zygot6 = 1 ; ! select MZM's Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; mean phenotypes end matrices; Means G ; ! model for means Covariances ! model for MZM variance/covariances A+C+E | A+C _ A+C | A+C+E ; st 15 G 1 1 Options RSiduals End G3: DZM twins, datagroup Data NInput_vars= 14 ! nr of inputvars per family Missing=-1 ! missing values = -1.00 REctangular file=all.dat ! read in raw datafile, must be in same directory LABELS ! tell Mx what is found in the datafile nih_id country zygot6 rear ageA sexA ldllnA apoblnA apoelnA ageB sexB ldllnB apoblnB apoelnB Select if country = 1 and zygot6 = 2 ; ! select Dutch twins, younger sample (Dorret) and DZM Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; ! mean phenotypes end matrices; Means G ; ! model for means Covariances ! model for DZM variance/covariances A+C+E | H@A+C _ H@A+C | A+C+E ; Options RSiduals End G4: MZF twins, datagroup Data NInput_vars= 14 ! nr of inputvars per family REctangular file=all.dat ! read in raw datafile, must be in same directory Missing=-1.00 ! missing values = -1.00 LABELS ! tell Mx what is found in the datafile nih_id country zygot6 rear ageA sexA ldllnA apoblnA apoelnA ageB sexB ldllnB apoblnB apoelnB Select if country = 1 ; ! select Dutch twins, younger sample (Dorret) Select if zygot6 = 3 ; ! select MZF's Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; mean phenotypes end matrices; Means G | G ; ! model for means Covariances ! model for MZF variance/covariances K+L+M | K+L _ K+L | K+L+M Options RSiduals G5: DZF twins, datagroup Data NInput_vars= 14 ! nr of inputvars per family Missing=-1.00 ! missing values = -1.00 REctangular file=all.dat ! read in raw datafile, must be in same directory LABELS ! tell Mx what is found in the datafile nih_id country zygot6 rear ageA sexA ldllnA apoblnA apoelnA ageB sexB ldllnB apoblnB apoelnB Select if country = 1 ; ! select Dutch twins, younger sample (Dorret) Select if zygot6 = 4 ; ! select DZF's Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; ! mean phenotypes end matrices; Means G ; ! model for means Covariances ! model for DZF variance/covariances K+L+M | K+L _ K+L | K+L+M ; Options RSiduals End G6: DOS-MF twins, datagroup Data NInput_vars= 14 ! nr of inputvars per family Missing=-1.00 ! missing values = -1.00 CMatrix file=all.dat ! read in raw datafile, must be in same directory LABELS ! tell Mx what is found in the datafile Select if country = 1 ; ! select Dutch twins, younger sample (Dorret) Select if zygot6 = 5 ; ! select DOSmf's Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; ! mean phenotypes end matrices; Means G ; ! model for means Covariances ! model for DOSMF variance/covariances A+C+E | F@(X*S')+(Y*T') _ F@(S*X')+(T*Y') | K+L+M ; Options RSiduals End G7: DOSFM twins, datagroup Data NInput_vars= 14 ! nr of inputvars per family Missing=-1.00 ! missing values = -1.00 REctangular file=all.dat ! read in raw datafile, must be in same directory LABELS ! tell Mx what is found in the datafile nih_id country zygot6 rear ageA sexA ldllnA apoblnA apoelnA ageB sexB ldllnB apoblnB apoelnB Select if country = 1 ; ! select Dutch twins, younger sample (Dorret) Select if zygot6 = 6 ; ! select DOSfm's Select ldllnA ldllnB ; ! select one phenotype per twin member Matrices = group 1 G Full 1 twonvar free ; ! mean phenotypes end matrices; Means G ; ! model for means Covariances ! model for DZ variance/covariances K+L+M | F@(S*X')+(T*Y') _ F@(X*S')+(Y*T') | A+C+E ; Options RSiduals Option Multiple sat=1399.434,290 ! -2LL of saturated model, will yield chi square for this model !Interval @95 V 1 1 1 V 1 1 2 V 1 1 3 V 1 2 1 V 1 2 2 V 1 2 3 P 1 1 1 P 1 2 1 G 1 1 1 F 1 1 1 End ! FIX DOS COVARIANCE FOR A AT 0.5, WHICH EQUALS THE DZ COVARIANCE ! THIS PROVIDES A TEST OF WHETHER THE SAME GENES ARE EXPRESSED IN MALES AND FEMALES DROP @.5 F 1 1 1 end