! Estimate genetic and environmental components - ACED model ! OZ BMI data - older males #NGroups 8 #define nvar 1 Title G1: Model Parameters Calculation Begin Matrices; X Lower nvar nvar Free ! additive genetic path, a Y Lower nvar nvar ! common environmental path, c Z Lower nvar nvar Free ! specific environmental path, e W Lower nvar nvar Free ! dominance genetic path, d M Full 1 1 Free H Full 1 1 ! scalar, 0.5 Q Full 1 1 ! scalar, 0.25 End Matrices; Label Row X add_gen Label Row Y comm_env Label Row Z spec_env Label Row W dom_gen Matrix H .5 Matrix Q .25 Begin Algebra; A= X*X'; ! additive genetic variance, a^2 C= Y*Y'; ! common environmental variance, c^2 E= Z*Z'; ! specific environmental variance, e^2 D= W*W'; ! dominance genetic variance, d^2 End Algebra; End Group Title G2: MZ data younger cohort #include ozbmi2.dat Select if zyg =2 !MZM Select if agecat =1 Select bmi1 bmi2 ; Begin Matrices = Group 1; ! copy all matrices from group 1, both declared and computed End Matrices; Means M|M; ! 1x2 vector of expected means Covariance ! 2x2 covariance matrix A+C+E+D | A+C+D _ A+C+D | A+C+E+D ; Option RSiduals; End Title G3: DZ data younger cohort #include ozbmi2.dat Select if zyg =4 !DZM Select if agecat =1 Select bmi1 bmi2 ; Begin Matrices = Group 1; End Matrices; Means M|M; Covariance A+C+E+D | H@A+C+Q@D _ H@A+C+Q@D | A+C+E+D; Option RSiduals End Title G4: Standardization young Calculation Begin Matrices = Group 1; End Matrices; Start .6 all ! start all free parameters at .6 Start 20 M 1 1 1 ! start free paramers for means at 20 (overwrite previous statement) Begin Algebra; V=A+C+E+D; ! total variance P=A|C|E|D; ! concatenate parameter estimates S=P@V~; ! standardized parameter estimates End Algebra; ! Interval S 1 1 - S 1 4 ! 95% confidence intervals around variance components Option NDecimals=4 End Title G5: Model Parameters Calculation Begin Matrices; X Lower nvar nvar Free ! additive genetic path, a Y Lower nvar nvar ! common environmental path, c Z Lower nvar nvar Free ! specific environmental path, e W Lower nvar nvar Free ! dominance genetic path, d M Full 1 1 Free H Full 1 1 ! scalar, 0.5 Q Full 1 1 ! scalar, 0.25 End Matrices; Label Row X add_gen Label Row Y comm_env Label Row Z spec_env Label Row W dom_gen Matrix H .5 Matrix Q .25 Begin Algebra; A= X*X'; ! additive genetic variance, a^2 C= Y*Y'; ! common environmental variance, c^2 E= Z*Z'; ! specific environmental variance, e^2 D= W*W'; ! dominance genetic variance, d^2 End Algebra; End Group Title G6: MZ data older cohort #include ozbmi2.dat Select if zyg =2 !MZM Select if agecat =2 Select bmi1 bmi2 ; Begin Matrices = Group 5; ! copy all matrices from group 1, both declared and computed End Matrices; Means M|M; ! 1x2 vector of expected means Covariance ! 2x2 covariance matrix A+C+E+D | A+C+D _ A+C+D | A+C+E+D ; Option RSiduals; End Title G7: DZ data older cohort #include ozbmi2.dat Select if zyg =4 !DZM Select if agecat =2 Select bmi1 bmi2 ; Begin Matrices = Group 5; End Matrices; Means M|M; Covariance A+C+E+D | H@A+C+Q@D _ H@A+C+Q@D | A+C+E+D; Option RSiduals End Title G8: Standardization old Calculation Begin Matrices = Group 5; End Matrices; Start .6 all ! start all free parameters at .6 Start 20 M 5 1 1 ! start free paramers for means at 20 (overwrite previous statement) Begin Algebra; V=A+C+E+D; ! total variance P=A|C|E|D; ! concatenate parameter estimates S=P@V~; ! standardized parameter estimates End Algebra; ! Interval S 1 1 - S 1 4 ! 95% confidence intervals around variance components Option NDecimals=4 Option multiple End Drop W 1 1 1 W 5 1 1 option issat end save AE_cohort.mxs EQ X 1 1 1 X 5 1 1 end get AE_cohort.mxs EQ Z 1 1 1 Z 5 1 1 end get AE_cohort.mxs EQ X 1 1 1 X 5 1 1 EQ Z 1 1 1 Z 5 1 1 end