! Multivariate Analysis of Dutch aggression data ! NYAGG1 = aggression in '91 ! NYAGG3 = aggression in '95 ! NYAGG4 = aggression in '97 ! NYAGG5 = aggression in 2000 ! ACE model #define nvar 3 ! number of dependent variables per individual #define ndef 1 ! number of definition variables (age -varies per year-) #ngroups 4 G1: calculation group Data Calc Begin matrices; ! **GO TO SLIDE** "Additive genetic path coefficients (X)" X Lower nvar nvar Free ! Additive genetic path coefficient Y Lower nvar nvar Free ! Common environmental path coefficient Z Lower nvar nvar Free ! Unique environmental path coefficient H Full 1 1 Fix ! .5 for dz cov A ! **GO TO SLIDE** "Additive Genetic Cross-Twin Covariance (DZ)" M Full 1 nvar Free ! Grand mean phenotypes B Full 1 ndef Free ! Age beta End matrices; Matrix H .5 ! Matrix H is fixed and contains .5 ! Provide starting values for the means Start 10 M 1 1 M 1 2 M 1 3 Start -0.1 B 1 1 ! For the variance components: diagonals ! Phenotypic variance St 2.0 X 1 1 X 2 2 X 3 3 St 2.0 Y 1 1 Y 2 2 Y 2 2 St 3.5 Z 1 1 Z 2 2 Z 3 3 ! Phenotypic covariance: off diagonals St 1.5 X 2 1 St 1.5 Y 2 1 St 1.5 Z 2 1 Begin algebra; ! **GO TO SLIDE** "Total Within-Twin Covariance" ! Aim is to estimate variance components attributable to A, C and E ! Instruct Mx how to use the path coefficients to estimate var/covariance for A, C and E A=X*X' ; ! Additive genetic variance ***Write Algebra*** C=Y*Y' ; ! Common environmental variance ***Write Algebra*** E=Z*Z' ; ! Unique environmental variance ***Write Algebra*** End algebra; Options ND=2 End !__________________________________________________ ! G2: MZ twins, datagroup Data NInput_vars= 19 ! nr of inputvars per family Missing=-1.00 REctangular file=aggression.dat ! ***Look at data file*** LABELS id TWZYG ZYG2 NYAGG1.1 NYAGG3.1 NYAGG4.1 NYAGG5.1 NYAGG1.2 NYAGG3.2 NYAGG4.2 NYAGG5.2 AGE1.1 AGE3.1 AGE4.1 AGE5.1 AGE1.2 AGE3.2 AGE4.2 AGE5.2 ! Tell Mx what is found in the datafile Select if zyg2 = 1 ; ! Select MZ's: zyg2: 1=MZ 2=DZ Select NYAGG1.1 NYAGG3.1 NYAGG4.1 ! NYAGG1.1 = aggression twin1 '91, NYAGG3.1 = aggression1 twin '95 NYAGG1.2 NYAGG3.2 NYAGG4.2 ! NYAGG1.2 = aggression twin2 '91, NYAGG3.2 = aggression2 twin '95 AGE1.1 AGE3.1 AGE4.1 ! AGE1.1 = age at interview twin1 '91, AGE3.1 = age at interview twin1 '95 AGE1.2 AGE3.2 AGE4.2 ; ! AGE1.2 = age at interview twin2 '91, AGE3.2 = age at interview twin2 '95 Definition AGE1.1 AGE3.1 AGE4.1 AGE1.2 AGE3.2 AGE4.2 ; Matrices = group 1 O full ndef nvar fix ! Definition variable(s) matrix for twin 1 i.e. Age for twin 1 at times 1 & 2 P full ndef nvar fix ! Definition variable(s) matrix for twin 2 i.e. Age for twin 2 at times 1 & 2 End matrices; Specify O age1.1 age3.1 AGE4.1 ! Age for twin 1 at times 1 & 2 Specify P age1.2 age3.2 AGE4.2 ! Age for twin 2 at times 1 & 2 ! **GO TO SLIDE** "Age effects on mean " Means M + B*O| M + B*P; ! Model for means = 1 by 4 matrix ! Twin1-variable-1 Twin1-variable-2 | Twin2-variable-1 Twin2-variable-2 ! + + + + ! age effect age effect age effect age effect Covariances ! model for MZ variance/covariances A+C+E |A+C _ ! **GO TO SLIDE** "Predicted Model" A+C |A+C+E ; Options RSiduals End !__________________________________________________ ! G3: DZ twins, datagroup Data NInput_vars= 19 ! nr of inputvars per family Missing=-1.00 REctangular file=aggression.dat LABELS id TWZYG ZYG2 NYAGG1.1 NYAGG3.1 NYAGG4.1 NYAGG5.1 NYAGG1.2 NYAGG3.2 NYAGG4.2 NYAGG5.2 AGE1.1 AGE3.1 AGE4.1 AGE5.1 AGE1.2 AGE3.2 AGE4.2 AGE5.2 ! Tell Mx what is found in the datafile Select if zyg2 = 2 ; ! Select NYAGG1.1 NYAGG3.1 NYAGG4.1 ! NYAGG1.1 = aggression twin1 '91, NYAGG3.1 = aggression1 twin '95 NYAGG1.2 NYAGG3.2 NYAGG4.2 ! NYAGG1.2 = aggression twin2 '91, NYAGG3.2 = aggression2 twin '95 AGE1.1 AGE3.1 AGE4.1 ! AGE1.1 = age at interview twin1 '91, AGE3.1 = age at interview twin1 '95 AGE1.2 AGE3.2 AGE4.2 ; ! AGE1.2 = age at interview twin2 '91, AGE3.2 = age at interview twin2 '95 Definition AGE1.1 AGE3.1 AGE4.1 AGE1.2 AGE3.2 AGE4.2 ; Matrices = Group 1 O full ndef nvar fix ! Definition variable(s) for twin 1 i.e. Age for twin 1 at times 1 & 2 P full ndef nvar fix ! Definition variable(s) for twin 2 i.e. Age for twin 2 at times 1 & 2 End matrices; Specify O age1.1 age3.1 age4.1 ! Age for twin 1 at times 1 & 2 Specify P age1.2 age3.2 age4.2 ! Age for twin 2 at times 1 & 2 Means M + B*O | M + B*P; ! model for means ! **GO TO SLIDE** "Predicted Model" ! ***Write the DZ covariance statement*** Covariances A+C+E |H@A+C _ ! **GO TO SLIDE** "Predicted Model" H@A+C |A+C+E ; Options RSiduals End !__________________________________________________ ! G4: Calculate A, C, and E latent factor correlations Data Calc Begin Matrices A computed nvar nvar = A1 C computed nvar nvar = C1 E computed nvar nvar = E1 H Full 1 1 I ident nvar nvar End Matrices MA H 0.5 Begin Algebra ; ! **GO TO SLIDE** "Estimating correlations between latent genetic and environmental factors" 2 slides T = \stnd(A); ! Estimate genetic correlations (rg) or T =\sqrt(I.A)~*A*\sqrt(I.A)~ ; U = \stnd(C) ; ! Estimate shared environmental correlations (rc) V = \stnd(E) ; ! Estimate non-shared environmental correlations P = \stnd(A+C+E | H@A+C _H@A+C | A+C+E); ! Estimates phenotypic correlations i.e standardizes the covariance matrix ! **GO TO SLIDE** "Proportion of observed phenotypic correlation explained by A, C and E" S = A%(A+C+E)| C%(A+C+E)|E%(A+C+E); ! Estimate standardized variance components, and ! proportion of phenoyptic correlations explained by A, C and E effects End ALgebra ; OP ND=4 ! Decimal places OP MUltiple OP ISSAT ! Compares ACE to submodels below End Save bivariate.mxs End ! ***How many parameters does this model estimate?*** ! ***Run Model*** !AE Drop shared environmental effects !Get bivariate.mxs !DRop Y 1 1 1 - Y 1 nvar nvar !ENd !CE Drop additive genetic effects ! ***Write script*** !Get bivariate.mxs !DRop X 1 1 1 - X 1 nvar nvar !ENd !E Drop A and C ! ***Write script*** !Get bivariate.mxs !DRop Y 1 1 1 - Y 1 nvar nvar !DRop X 1 1 1 - X 1 nvar nvar !ENd ! ***Run Model***