! Fitting univariate models to raw data - rectangular data files ! ! univariateraw_withcovariates.mx ! ! Whitfield alcohol challenge male data, ADH1B genotype ! and alcohol dependence symptom count ! #NGroups 4 Analysis of alcohol dependence symptom count - univariate genetic model ! Incorporates ADH1B genotype information, but NO control for stratification Calculation Begin Matrices; W Lower 1 1 Free ! additive genetic path X Lower 1 1 ! non-additive genetic path (fixed in this application) Y Lower 1 1 Free ! shared environmental path Z Lower 1 1 Free ! within-family environmental path M Full 1 2 Free ! vector of means (intercepts) B Full 1 2 Free ! vector of regression coefficients End Matrices; Begin Algebra; A= W*W'; D= X*X'; C= Y*Y'; E= Z*Z'; N= A+D+C+E; I= N~ *A; J= N~ *C; L= N~ *E; End Algebra; Specify M 101 101 Specify B 102 102 Start 0.88 m(1,1) Start 0.25 z(1,1) Start 0.25 w(1,1) Start 0.25 y(1,1) Start -0.4 b(1,1) Bound 0.01 10 z(1,1) Interval b(1,1) m(1,1) I(1,1) j(1,1) l(1,1) End MZ male twin pairs Data NInputvars=6 Rectangular File=whitmz.rec Labels obs alcsxt1 alcsxt2 gtypt1 gtypt2 zyg Definition_variables obs gtypt1 gtypt2 zyg ; Begin Matrices = Group 1; K Full 2 2 ! matrix for definition variables End Matrices; Specify K gtypt1 0 0 gtypt2 Covariances (A+D+C+E | A+D+C_ A+D+C | A+D+C+E); Means M+ B*K; Options RSiduals End DZ male pairs both twins genotyped Data NInputvars=6 Rectangular File=whitdz2.rec Labels obs alcsxt1 alcsxt2 gtypt1 gtypt2 zyg Definition_variables obs gtypt1 gtypt2 zyg ; Begin Matrices = group 1 ; K Full 2 2 G Diag 1 1 H Diag 1 1 End Matrices; Specify K gtypt1 0 0 gtypt2 Covariances (A+D+C+E | g*A+h*D+C_ g*A+h*D+C | A+D+C+E); Means M+ B*K; Matrix G 0.5 Matrix H 0.25 Options RSiduals End DZ males with cotwin not genotyped, plus males from unlike-sex twin pairs Data NInputvars=4 Rectangular fi=whitdz1.rec Labels obs alcsx gtyp zyg Definition_variables obs gtyp zyg ; Begin Matrices; V Computed = N1 ! variance (from group 1) M Full 1 1 Free ! mean (intercepts) B Full 1 1 Free ! vector of regression coefficients K Full 1 1 ! matrix for definition variables End Matrices; Specify M 101 Specify B 102 Specify K gtypt1 Covariance V; Means M+ B*K; Options RSiduals End