! DATA: continuous height data ! INPUT: raw data ! DATA-GROUPS: MZ DZ (in alle groepen zitten ook Sibs) ! MEANS MODEL : 1 grand mean, taking into account effect of COHORT and sex and SNP ! VARIANCE COVARIANCE MODEL: MZ & DZ covariance !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! #define nvar 1 ! number of dependent variables per individual #define ndef 6 ! number of covariates per individual (4 snps + sex and age in this script) G1: calculation group Data Calc NGroups=3 Begin matrices; J full 1 nvar free ! grand mean P full ndef nvar Free ! estimated effects of the covariates A sym nvar nvar free ! twin var AND sib var G sym nvar nvar free ! cov MZt1-t2 H sym nvar nvar free ! cov DZt1-t2 I sym nvar nvar free ! cov MZtwin-sib en DZtwin-sib End matrices; !provide starting values st 170 J 1 1 ! starting values mean height st 100 A 1 1 ! var st 20 G 1 1 ! covar st 20 H 1 1 ! covar st 20 I 1 1 ! covar st -5.0 P 1 1 ! starting values voor definition variables st 0.01 P 2 1 st 0.0 P 3 1 st 0.0 P 4 1 st 0.0 P 5 1 st 0.0 P 6 1 Begin Algebra; T = \stnd(A|G|I_G|A|I_I|I|A) ; !off-diagonal is MZ correlation U = \stnd(A|H|I_H|A|I_I|I|A) ; !off-diagonal is DZ correlation End Algebra ; Labels row P sex coh snp1 snp2 snp3 snp4 !Drop @0 P 1 1 1 ! no cohort effect option no_output end G2: MZ twins ! MZ Data Ninput_vars=23 ! Number of variables per family missing=-9 ! Missing values voor afhankelijke variabelen !NB: missing values dependent vars moeten andere waarden hebben (hier -4.00) Rectangular file=vitdata2.dat ! read raw data, this is the file created in SPSS Labels ! provide labels for the variables FAM TWZ SEX1 COH1 Height1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 Height2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 Height3 SNP31 SNP32 SNP33 SNP34 Select if TWZ = 1; !MZ twins selected Select SEX1 COH1 Height1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 Height2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 Height3 SNP31 SNP32 SNP33 SNP34; Definition SEX1 COH1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 SNP31 SNP32 SNP33 SNP34; Matrices = Group 1 ! get all matrices from group 1 V Full 1 ndef fix ! observed covariates for twin 1 W Full 1 ndef fix ! observed covariates for twin 2 X Full 1 ndef fix ! observed covariates for sib End matrices; Specify V SEX1 COH1 SNP11 SNP12 SNP13 SNP14; Specify W SEX2 COH2 SNP21 SNP22 SNP23 SNP24; Specify X SEX3 COH3 SNP31 SNP32 SNP33 SNP34; Means J+V*P | J+W*P | J+X*P; ! means model Covariances ! variance/covariance model A | G | I _ G | A | I_ I | I | A ; end G3: DZ twins ! DZ twins plus 1 sib Data Ninput_vars=23 ! Number of variables per family missing=-9 ! Missing values voor afhankelijke variabelen !NB: missing values dependent vars moeten andere waarden hebben (hier -4.00) Rectangular file=vitdata2.dat ! read raw data, this is the file created in SPSS Labels FAM TWZ SEX1 COH1 Height1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 Height2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 Height3 SNP31 SNP32 SNP33 SNP34 Select if TWZ = 2; !DZ twins selected Select SEX1 COH1 Height1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 Height2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 Height3 SNP31 SNP32 SNP33 SNP34; Definition SEX1 COH1 SNP11 SNP12 SNP13 SNP14 SEX2 COH2 SNP21 SNP22 SNP23 SNP24 SEX3 COH3 SNP31 SNP32 SNP33 SNP34; Matrices = Group 1 ! get all matrices from group 1 V Full 1 ndef fix ! observed covariates for twin 1 W Full 1 ndef fix ! observed covariates for twin 2 X Full 1 ndef fix ! observed covariates for sib End matrices; Specify V SEX1 COH1 SNP11 SNP12 SNP13 SNP14; Specify W SEX2 COH2 SNP21 SNP22 SNP23 SNP24; Specify X SEX3 COH3 SNP31 SNP32 SNP33 SNP34; Means J+V*P | J+W*P | J+X*P; ! means model Covariances ! variance/covariance model A| H | I _ H | A | I_ I | I | A ; option nd=4 option multiple end !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!EINDESCRIPT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! drop @0 p 1 3 1 p 1 4 1 p 1 5 1 p 1 6 1 end