! ACEQ model fitting for Total mole count (ln(x+1)) #define nvar 1 #NGroups 5 G1: Calculation Begin Matrices; X lower nvar nvar free ! additive genetic path coefficients Y lower nvar nvar free ! shared environment path coefficients Z lower nvar nvar free ! nonshared environment path coefficients T lower nvar nvar free ! QTL path coefficients H full 1 1 End Matrices; Matrix H .5 Begin Algebra; A=X*X'; ! additive genetic variance components C=Y*Y'; ! shared environment variance components E=Z*Z'; ! nonshared environment variance components Q=T*T'; ! QTL variance components V=A+C+Q+E; ! total variance P=A|C|Q|E; ! estimates arranged in one matrix S=P@V~; ! standardized variance components End Algebra; Start .3 all Label Col P a^2 c^2 q^2 e^2 Label Row P varcomp Label Col S a^2 c^2 q^2 e^2 Label Row S standvc Option Rsiduals End G2: DZ IBD2 twins Data NInput=8 Rectangular File=moledz.dat Labels mole1 mole2 zyg sex1 sex2 p0 p1 p2 Select if p2 =1; Select mole1 mole2 ; Matrices = Group 1 K full 1 1 M full 2 1 free End Matrices; Matrix K 1 Matrix M 4 4 Means M / Covariance A+C+Q+E | H@A+C+K@Q _ H@A+C+K@Q | A+C+Q+E / End G3: DZ IBD1 twins Data NInput=8 Rectangular File=moledz.dat Labels mole1 mole2 zyg sex1 sex2 p0 p1 p2 Select if p1 =1; Select mole1 mole2 ; Matrices = Group 1 K full 1 1 M full 2 1 free End Matrices; Matrix K .5 Matrix M 4 4 Means M / Covariance A+C+Q+E | H@A+C+K@Q _ H@A+C+K@Q | A+C+Q+E / End G4: DZ IBD0 twins Data NInput=8 Rectangular File=moledz.dat Labels mole1 mole2 zyg sex1 sex2 p0 p1 p2 Select if p0 =1; Select mole1 mole2 ; Matrices = Group 1 M full 2 1 free End Matrices; Matrix M 4 4 Means M / Covariance A+C+Q+E | H@A+C _ H@A+C | A+C+Q+E / Option Rsiduals End G4: MZ twins Data NInput=5 Rectangular File=molemz.dat Labels mole1 mole2 zyg sex1 sex2 Select mole1 mole2 ; Matrices = Group 1 M full 2 1 free End Matrices; Matrix M 4 4 Means M / Covariance A+C+Q+E | A+C+Q _ A+C+Q | A+C+Q+E / Option Rsiduals Iterations=5000 NDecimals=4 Option Multiple Issat End ! Test for QTL Drop T 1 1 1 End