Twin Analysis 103October 20101Wednesday, October 13, 2010Specifications ContinuousmxMatrixmxMatrixmxMatrixmxAlgebramxAlgebramxAlgebraCholMZT1T2expCovMZT1T2T1#10T1var1covT2#2#3T2covvar2T1T2expMeanMZ#4#52mzDataselVarsselVarsfambmi1bmi2145720NA17822524mxObjectivecovariance=expCovMZmeans=expMeanMZdimnames=selVarsmxDataobserved=mzDatatype=rawWednesday, October 13, 2010MZ & DZ Twins Reared Together3Wednesday, October 13, 2010MZ & DZ Twins Reared Together MZ twins! ! ! ! DZ twins3Wednesday, October 13, 2010MZ & DZ Twins Reared Together MZ twins! ! ! ! DZ twins4 parameters3Wednesday, October 13, 2010-2LLdfChi2*dfpAICChi2#dfpSat4055.91767ADE4063.417737.5260.28517.4AE4067.6177311.7370.11519.61ACE4067.6177311.7360.07521.6CE4220.31774164.3770672.3152.610E4591.71775535.86801041.7524.120Goodness-of-FitChi2*: likelihood ratio test compared to saturated modelChi2#: likelihood ratio test compared to ADE or ACE model4Wednesday, October 13, 2010aceda2c2e2d2SatADE0.570.410.540.320.170.29AE0.790.420.620.17ACE0.7900.420.6200.17CE0.680.560.460.32E0.880.78Parameter Estimatesa2 , c2 etc. should be unstandardized variance components5Wednesday, October 13, 2010Specifications BinarymxMatrixmxMatrixmxMatrixmxAlgebramxAlgebramxAlgebraexpCorMZT1T2T110T2#21T1T2expMeanMZ00expThreMZ#4#56mzDataBinselVarsselVarsfamob1ob214570NA178211mxObjectivecovariance=expCorMZmeans=expMeanMZdimnames=selVarsthresholds=expThreMZmxDataobserved=mzDataBintype=rawWednesday, October 13, 2010Changes to OpenMx CodemzDataBin[,1:2] <- mxFactor(mzDataBin[,1:2], levels = c(0:1))# Constraint on variance of ordinal variables! mxConstraint( V== I, name="Var1"),# Matrix & Algebra for expected means vector! mxMatrix( "Zero", 1, ntv, name="expMeanMZ" ),# Matrix & Algebra for expected thresholds# Binary! mxMatrix( "Full", 1, nv, free=TRUE, values=.8, label="thre", name="Thre" ),!mxAlgebra( cbind(Th,Th), dimnames=list('th1',selVars), name="expThre" ),# Ordinal mxMatrix( "Full", nth, ntv, free=T, values=thValues, lbound=thLBound, name="Thre"), mxMatrix( "Lower", nth, nth, free=FALSE, values=1, name="Inc" ), mxAlgebra( expression= Inc %*% Thre, name="ThreInc"), mxAlgebra( cbind(ThreInc,ThreInc),dimnames=list(thRows,selVars),name="expThreMZ" ),# Objective mxFIMLObjective( "ACE.expCovMZ", "ACE.expMean", selVars, thresholds="ACE.expThre" )7Wednesday, October 13, 2010-2LLdfChi2*dfpAICChi2#dfpSatADE3AE41ACE3CE41E52Goodness-of-FitChi2*: likelihood ratio test compared to saturated modelChi2#: likelihood ratio test compared to ADE or ACE model8Wednesday, October 13, 2010aceda2c2e2d2SatADEAEACECEEParameter Estimatesa2 , c2 etc. should be unstandardized variance components9Wednesday, October 13, 2010Specifications OrdinalmxMatrixmxMatrixmxMatrixmxAlgebramxAlgebramxAlgebramxAlgebramxAlgebraexpCorMZT1T2expThreMZth1t1th1t1th1t2th1t2T110th2t1th2t1th2t2th2t2T2#21th3t1th3t1th3t2th3t2T1T2Inc100expMeanMZ00110Thre#4#5111#6#7#8#910mzDataOrdselVarsselVarsfamob1ob214570NA178211mxObjectivecovariance=expCorMZmeans=expMeanMZdimnames=selVarsthresholds=expThreMZmxDataobserved=mzDataOrdtype=rawWednesday, October 13, 2010Heterogeneity11Wednesday, October 13, 2010•Univariate Analysis: What are the contributions of additive genetic, dominance/shared environmental and unique environmental factors to the variance?•Are the contributions of genetic and environmental factors equal for different groups, such as sex, race, ethnicity, SES, environmental exposure, etc.?Heterogeneity Questions I12Wednesday, October 13, 2010•Are these differences due to differences in the magnitude of the effects (quantitative)?•e.g. Is the contribution of genetic/environmental factors greater/smaller in males than in females?•Are the differences due to differences in the nature of the effects (qualitative)?•e.g. Are there different genetic/environmental factors influencing the trait in males and females?Heterogeneity Questions II13Wednesday, October 13, 2010ComparisonConcordant for group membershipDiscordant for group membershipgenderMZ & DZ: MM & FF pairsDZ: opposite sex pairsageMZ & DZ: young & old pairsnationalityMZ & DZ: OZ & US pairsenvironmentMZ & DZ: urban & rural pairsMZ & DZ: urban/ rural pairsGroups14Wednesday, October 13, 2010Heterogeneity Modelsame sex pairs15Wednesday, October 13, 2010Homogeneity Modelsame sex pairs16Wednesday, October 13, 2010OSG1G2EPHeterogeneity12a1 c1 e1a2 c2 e26Homogeneity12a1 c1 e1a1 c1 e13Models for Concordant Pairs17Wednesday, October 13, 2010Heterogeneity Twin AnalysisHetTwinQnMaRawCon.R # Prepare Data and Print Summary Statistics# ———————————————————————————————————-data(twinData)summary(twinData)Vars <- 'bmi'nv <- 1selVars <- paste(Vars,c(rep(1,nv),rep(2,nv)),sep="") ntv <- nv*2mzfData <- subset(twinData, zyg==1, selVars)dzfData <- subset(twinData, zyg==3, selVars)mzmData <- subset(twinData, zyg==2, selVars)dzmData <- subset(twinData, zyg==4, selVars)colMeans(mzfData,na.rm=TRUE)....cov(mzfData,use="complete")....18Wednesday, October 13, 2010ACE males/ femalesHetTwinQnMaRawCon.R# Fit Heterogeneity ACE Model with RawData and Matrices Input# ———————————————————————————————————-univHetACEModel <- mxModel("univHetACE",!mxModel("ACE",! # Matrices a, c, and e to store a, c, and e path coefficients! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="am11", name="am" ),! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="cm11", name="cm" ),! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="em11", name="em" ),! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="af11", name="af" ),! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="cf11", name="cf" ),! ! mxMatrix( "Full", nv, nv, free=TRUE, values=.6, label="ef11", name="ef" ),! # Matrices A, C, and E compute variance components! ! mxAlgebra( am %*% t(am), name="Am" ),! ! mxAlgebra( cm %*% t(cm), name="Cm" ),! ! mxAlgebra( em %*% t(em), name="Em" ),! ! mxAlgebra( am %*% t(am), name="Af" ),! ! mxAlgebra( cm %*% t(cm), name="Cf" ),! ! mxAlgebra( em %*% t(em), name="Ef" ),19Wednesday, October 13, 2010inverse Standard DeviationsHetTwinQnMaRawCon.R! # Algebra to compute total variances and standard deviations (diagonal only)! ! mxAlgebra( Am+Cm+Em, name="Vm" ),! ! mxAlgebra( Af+Cf+Ef, name="Vf" ),! ! mxMatrix( "Iden", nv, nv, name="I"),! ! mxAlgebra( solve(sqrt(I*Vm)), name="isdm"),! ! mxAlgebra(
View Full Document