! univariate_raw.mx (for continuous data) ! fitting a univariate genetic model to raw continuous data #define nvar 1 Analysis of depression symptom count data: fitting ACE model data NI=2 NG=2 LAbels twina twinb Rectangular fi=depmzf.rec Begin matrices; W LO nvar nvar fr ! additive genetic path (A=w*w') X LO nvar nvar fr ! shared environmental path (C=x*x') Y LO nvar nvar fr ! non-shared environmental path (E=y*y') Z LO nvar nvar fi ! non-additive genetic path (D=z*z') M FU maxthresf nvar fi ! mean for females end matrices; SP M 4 MATRIX M 0.0 mat w 0.5 mat x 0.5 mat y 0.7 Begin algebra; A=W*W'; C=X*X'; E=Y*Y'; D=Z*Z'; V=A+C+D+E; end algebra; MEANS M|M; ! tells MX that row and column thresholds contained in M_M CO V|A+D+C_ A'+D'+C'|V; ! formula for correlation matrix! bo 0.001 1.0 y(1,1) bo 0.0001 0.999 w(1,1) x(1,1) bo -5.0 5.0 m(1,1) interval a(1,1) c(1,1) e(1,1) ! compute 95% confidence interval for correlation OPT func=1.E-12 OPT RS END Analysis of depression symptom count data: fitting ACE model data NI=2 LAbels twina twinb Rectangular fi=depmzm.rec ! Begin matrices; W LO nvar nvar fr ! additive genetic path (A=w*w') X LO nvar nvar fr ! shared environmental path (C=x*x') Y LO nvar nvar fr ! non-shared environmental path (E=y*y') Z LO nvar nvar fi ! non-additive genetic path (D=z*z') M FU maxthresf nvar fi ! mean for females end matrices; SP M 4 MATRIX M 0.0 mat w 0.5 mat x 0.5 mat y 0.7 Begin algebra; A=W*W'; C=X*X'; E=Y*Y'; D=Z*Z'; V=A+C+D+E; end algebra; MEANS M|M; ! tells MX that row and column thresholds contained in M_M CO V|A+D+C_ A'+D'+C'|V; ! formula for correlation matrix! bo 0.001 1.0 y(1,1) bo 0.0001 0.999 w(1,1) x(1,1) bo -5.0 5.0 m(1,1) interval a(1,1) c(1,1) e(1,1) ! compute 95% confidence interval for correlation OPT func=1.E-12 OPT RS END Analysis of univariate raw data: DZf data NI=2 LAbels twina twinb Rectangular fi=depdzf.rec Begin matrices = group 1; g DI 1 1 ! constant (=0.5) for coefficient of additive genetic component h DI 1 1 ! constant (=0.25) for coefficient of dominance genetic component n FU maxthresf nvar fr ! estimated twin mean end matrices; MATRIX N 0.0 MAT g 0.5 MAT h 0.25 Means N|N; CO V|g@A+h@D+C_ g@A'+h@D'+C'|V; ! formula for correlation matrix! bo -5.0 5.0 n(1,1) OPT RS END Analysis of univariate raw data: DZm data NI=2 LAbels twina twinb Rectangular fi=depdzm.rec Begin matrices = group 1; g DI 1 1 ! constant (=0.5) for coefficient of additive genetic component h DI 1 1 ! constant (=0.25) for coefficient of dominance genetic component n FU maxthresf nvar fr ! estimated twin mean end matrices; MATRIX N 0.0 MAT g 0.5 MAT h 0.25 Means N|N; CO V|g@A+h@D+C_ g@A'+h@D'+C'|V; ! formula for correlation matrix! bo -5.0 5.0 n(1,1) OPT RS END Analysis of univariate raw data: DZfm data NI=2 LAbels twina twinb Rectangular fi=depdzfm.rec Begin matrices = group 1; g DI 1 1 ! constant (=0.5) for coefficient of additive genetic component h DI 1 1 ! constant (=0.25) for coefficient of dominance genetic component n FU maxthresf nvar fr ! estimated twin mean end matrices; MATRIX N 0.0 MAT g 0.5 MAT h 0.25 Means N|N; CO V|g@A+h@D+C_ g@A'+h@D'+C'|V; ! formula for correlation matrix! bo -5.0 5.0 n(1,1) OPT RS END