! SCRIPT NAME : Cholesky.mx (mb) ! GOAL : ACE model for a trait rated by mother and father of the subject ! DATA : continuous ! INPUT : raw data ! UNI/BI/MULTI : univariate ! DATA-GROUPS : MZM, DZM ! MEANS MODEL : means ! VARIANCE COVARIANCE MODEL(S) : 1. ACE ! Downloading Mx software: http://www.vcu.edu/mx ! Mx script's library: http://www.psy.vu.nl/mxbib ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #ngroups 3 ! number of groups #define nvar 2 ! number of variables (phenotypes) under study #define nrater 2 ! number of raters (e.g. mother and father) #define nratnsib 4 ! number of rater * number of sibs (in this case twinpairs) * nvar G1: boys Data Calc Begin Matrices; X Lower nvar nvar Free ! genetic structure for behavior similar assessed by both parents Y Lower nvar nvar Free ! shared environmental structure for behavior similar assessed by both parents Z Lower nvar nvar Free ! nonshared environmental structure for behavior similar assessed by both parents R full nratnsib 1 Free ! means H Full 1 1 Fixed I Ident nvar nvar End Matrices; Matrix H .5 ! Matrix H is fixed and contains .5 St .5 all Start 1 R 1 1 - R 4 1 Begin Algebra; A= X*X' ; ! additive genetic variance of behavior similar assessed by both parents C= Y*Y' ; ! shared environmental variance of behavior similar assesed by both parents E= Z*Z' ; ! nonshared environmental variance of behavior similar assessed by both parents T= A+C+E; F= (\SQRT(I.T)); ! Diagonal matrix of standard deviations U= F~*X_ F~*Y_ F~*Z; ! Standardized path coefficients End Algebra; End G2: male MZ twin pairs Data NInput_vars=29 ! number of variables in data file Missing=-1.00 ! missing value = -1.00 Rectangular File= ! read in raw data file LABELS NTRID SEXA SEXB ZYG COHORT TDELM7A TAGGM7A TDELV7A TAGGV7A TDELM7B TAGGM7B TDELV7B TAGGV7B TDELM10A TAGGM10A TDELV10A TAGGV10A TDELM10B TAGGM10B TDELV10B TAGGV10B TDELM12A TAGGM12A TDELV12A TAGGV12A TDELM12B TAGGM12B TDELV12B TAGGV12B ! Tell mx what is found in the datafile Select if ZYG = 1; ! select MZM twins Select TDELM12A TDELV12A TDELM12B TDELV12B ; ! select a phenotype (rated by mother and rated by father) Matrices= Group 1 Means R ; ! model for the means Covariances A+C+E | A+C_ A+C | A+C+E ; ! model for MZ variance/covariance Option RSidual End G3: male DZ twin pairs Data NInput_vars=29 ! number of variables in data file Missing=-1.00 ! missing value = -1.00 Rectangular File=TAD.dat ! read in raw data file LABELS NTRID SEXA SEXB ZYG COHORT TDELM7A TAGGM7A TDELV7A TAGGV7A TDELM7B TAGGM7B TDELV7B TAGGV7B TDELM10A TAGGM10A TDELV10A TAGGV10A TDELM10B TAGGM10B TDELV10B TAGGV10B TDELM12A TAGGM12A TDELV12A TAGGV12A TDELM12B TAGGM12B TDELV12B TAGGV12B ! Tell mx what is found in the datafile Select if ZYG = 2; ! select DZM twins Select TDELM12A TDELV12A TDELM12B TDELV12B ; ! select a phenotype (rated by mother and rated by father) Matrices= Group 1 Means R ; ! model for the means Covariances ! model for DZ variance/covariance Option RSidual End