/
Fitting Bivariate Models Fitting Bivariate Models

Fitting Bivariate Models - PowerPoint Presentation

pasty-toler
pasty-toler . @pasty-toler
Follow
369 views
Uploaded On 2018-03-08

Fitting Bivariate Models - PPT Presentation

October 21 2014 Elizabeth PromWormley amp Hermine Maes ecpromwormlevcuedu 8048288154 The Problems BMI may not be an appropriate measure for use in studying the genetics of obesity ID: 643129

covariance twin cross trait twin covariance trait cross genetic variance matrix bivariate covariances wt2 data 1twin twins variances ht1 wt1 ht2 correlation

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Fitting Bivariate Models" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Fitting Bivariate Models

October 21, 2014

Elizabeth Prom-Wormley &

Hermine

Maes

ecpromwormle@vcu.edu

804-828-8154Slide2

The Problem(s)

BMI may not be an appropriate measure for use in studying the genetics of obesity

Do height and weight share the same genetic/environmental influences?

Smoking is a risk factor for cardiovascular disease, but how ?

Does smoking

in adolescence lead to cardiovascular disease in adulthood?Slide3

A Solution

Bivariate Genetic Analysis

Two or more traits can be correlated because they share common genes or common environmental influences

e.g. Are the same genetic/environmental factors influencing the traits

?

With twin data on multiple traits it is possible to partition the

covariation

into its genetic and environmental components

Goal: to understand what factors make sets of variables correlate or co-varySlide4

Bivariate Analysis

A Roadmap

1- Use the data to test basic assumptions inherent to standard

genetic models

Saturated Bivariate

Model

2- Estimate the

contributions of genetic and environmental factors to the covariance between two

traits

Bivariate Genetic Models (Bivariate Genetic Analysis via

Cholesky

Decomposition)Slide5

Getting a Feel for the Data

Phenotypic and Twin Correlations

 

MZ

 

DZ

 

Height2

Weight2

 Height2Weight2Height10.880.41 0.440.23Weight10.490.84 0.170.33

Open R script for today

r

Weight

/

Height

= 0.47Slide6

Getting a Feel for the Data

Phenotypic and Twin Correlations

 

MZ

 

DZ

 

Height2

Weight2

 Height2Weight2Height10.880.41 0.440.23Weight10.490.84 0.170.33

r

Weight

/Height = 0.47

Expectations

1-

rMZ

>

rDZ

(cross-twin/cross-trait)

Genetic

effects contribute to the relationship between height and weight

2- Cross

-twin cross-variable correlations are not as big as the correlations between

twins

within

variables.

Variable specific

genetic

effects on height and/

or weightSlide7

So…How Can We be Sure?Slide8

Building the

Bivariate Genetic Model

Sources

of Information

Cross

-trait covariance

within

individuals

Within-Twin CovarianceCross-trait covariance between twinsCross-Twin CovarianceMZ:DZ ratio of cross-trait covariance between twinsSlide9

Basic Data Assumptions

MZ

and DZ twins are sampled from the same population, therefore we expect

Equal means/variances in Twin 1 and Twin 2

Equal means/variances in MZ and DZ

twins

Equal

covariances

between Twin 1 and Twin 2 in MZ and DZ twins

9Slide10

Getting a Feel for the Data

Means

 

ht1

wt1

ht2

wt2

MZ

16.30

5.67

16.29

5.65

DZ

16.41

5.82

16.33

5.77Slide11

Getting a Feel for the Data

Variances-

Covariances

 

ht1

wt1

ht2

wt2

ht1wt1ht2wt2

ht1

wt1

ht2

wt2

ht1

wt1

ht2

wt2

MZ Twins

DZ Twins

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2Slide12

Getting a Feel for the Data

Variances-

Covariances

Variances Slide13

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

Twin 1- P1

P2

Variance

Twin 1- P2

P

1

Variance

Twin2- P1

P

2

Variance

Twin 2- P2

Twin 1

Twin 2

Twin 1

Twin 2

VariancesSlide14

Getting a Feel for the Data

Variances-

Covariances

 

ht1

wt1

ht2

wt2

ht10.43wt10.73ht20.44

wt2

0.78

ht1

wt1

ht2

wt2

ht1

0.48

wt1

0.75

ht2

0.46

wt2

0.86

MZ Twins

DZ Twins

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2Slide15

Getting a Feel for the Data

Variances-

Covariances

Cross-Trait / Within-Twin CovarianceSlide16

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

Twin 1- P1

Covariance

Twin 1

P1/P2

P2

Covariance

Twin 1

P1/P2

Variance

Twin 1- P2

P

1

Variance

Twin2- P1

Covariance

Twin 2

P1/P2

P

2

Covariance

Twin 2

P1/P2

Variance

Twin 2- P2

Twin 1

Twin 2

Twin 1

Twin 2

Variances

+

Cross-Trait

Within-Twin

CovariancesSlide17

Getting a Feel for the Data

Variances-

Covariances

 

ht1

wt1

ht2

wt2

ht10.430.28wt10.280.73ht20.44

0.26

wt2

0.26

0.78

ht1

wt1

ht2

wt2

ht1

0.48

0.26

wt1

0.26

0.75

ht2

0.46

0.28

wt2

0.28

0.86

MZ Twins

DZ Twins

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2Slide18

Getting a Feel for the Data

Variances-

Covariances

Cross-Trait / Within-Twin CovarianceSlide19

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

Twin 1- P1

Covariance

Twin 1

P1/P2

P1 Within Trait

T1 /T2 Covariance

P2

Covariance

Twin 1

P1/P2

Variance

Twin 1- P2

P2 Within Trait

T1 /T2 Covariance

P

1

P1 Within Trait

T1 /T2

Covariance

Variance

Twin2- P1

Covariance

Twin 2

P1/P2

P

2

P2 Within Trait

T1 /T2

Covariance

Covariance

Twin 2

P1/P2

Variance

Twin 2- P2

Twin 1

Twin 2

Twin 1

Twin 2

Variances

+

Cross-Trait

Within-Twin

Covariances

+

Within-Trait

Cross-Twin

CovariancesSlide20

Getting a Feel for the Data

Variances-

Covariances

 

ht1

wt1

ht2

wt2

ht10.430.280.38wt10.280.730.64ht20.38

0.44

0.26

wt2

0.64

0.26

0.78

ht1

wt1

ht2

wt2

ht1

0.48

0.26

0.21

wt1

0.26

0.75

0.27

ht2

0.21

0.46

0.28

wt2

0.27

0.28

0.86

MZ Twins

DZ Twins

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1

Twin 2

Twin 1Twin 2Slide21

Getting a Feel for the Data

Variances-

Covariances

Cross-Trait / Cross-Twin CovarianceSlide22

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

Twin 1- P1

Covariance

Twin 1

P1/P2

P1 Within Trait

T1 /T2 Covariance

P1/P2

Cross-Trait

T1 /T2

Covariance

P2

Covariance

Twin 1

P1/P2

Variance

Twin 1- P2

P2/P1

Cross-Trait

T1 /T2

Covariance

P2 Within Trait

T1 /T2 Covariance

P

1

P1 Within Trait

T1 /T2

Covariance

P2/P1

Cross-Trait

T1 /T2

Covariance

Variance

Twin2- P1

Covariance

Twin 2 P1/P2P 2

P1/P2

Cross-Trait

T1 /T2

Covariance

P2 Within Trait

T1 /T2

Covariance

Covariance

Twin 2

P1/P2

Variance

Twin 2- P2

Twin 1

Twin 2

Twin 1

Twin 2

Variances

+

Cross-Trait

Within-Twin

Covariances

+

Within-Trait

Cross-Twin

CovariancesSlide23

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

Twin 1- P1

Covariance

Twin 1

P1/P2

P1 Within Trait

T1 /T2 Covariance

P1/P2

Cross-Trait

T1 /T2

Covariance

P2

Covariance

Twin 1

P1/P2

Variance

Twin 1- P2

P2/P1

Cross-Trait

T1 /T2

Covariance

P2 Within Trait

T1 /T2 Covariance

P

1

P1 Within Trait

T1 /T2

Covariance

P2/P1

Cross-Trait

T1 /T2

Covariance

Variance

Twin2- P1

Covariance

Twin 2 P1/P2P 2

P1/P2

Cross-Trait

T1 /T2

Covariance

P2 Within Trait

T1 /T2

Covariance

Covariance

Twin 2

P1/P2

Variance

Twin 2- P2

Twin 1

Twin 2

Twin 1

Twin 2

Variances

+

Cross-Trait

Within-Twin

Covariances

+

Within-Trait

Cross-Twin

Covariances

+

Cross-Twin

Cross-Trait

CovariancesSlide24

Observed Variance-Covariance Matrix

P1

P

2

P1

P

2

P

1

Variance

P1

P2

Covariance P1-P2

Variance

P2

P

1

Within-trait

P1

Cross-trait

Variance

P1

P

2

Cross-trait

Within-trait

P2

Covariance P1-P2

Variance

P2

Twin 1

Twin 2

Twin 1

Twin 2

Within-twin

covariance

Within-twin

covariance

Cross-twin

covarianceSlide25

Getting a Feel for the Data

Variances-

Covariances

 

ht1

wt1

ht2

wt2

ht10.430.280.380.24wt10.280.730.280.64ht20.380.28

0.44

0.26

wt2

0.24

0.64

0.26

0.78

ht1

wt1

ht2

wt2

ht1

0.48

0.26

0.21

0.15

wt1

0.26

0.75

0.110.27ht2

0.21

0.11

0.46

0.28

wt2

0.15

0.27

0.28

0.86

MZ Twins

DZ Twins

Twin 1

Twin 2

Twin 1

Twin 2Twin 1Twin 2Twin 1Twin 2Slide26

Within-twin cross-trait

covariances

imply common etiological influences

Cross

-twin cross-trait

covariances

imply familial common etiological influences

MZ

/DZ ratio of cross-twin cross-trait

covariances reflects whether common etiological influences are genetic or environmentalCross-Trait CovariancesSlide27

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Variances of X & Y same across twins and zygosity groupsSlide28

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Covariances of X & Y same across twins and zygosity groupsSlide29

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Cross-Twin Within-Trait Covariances differ by zygositySlide30

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Cross-Twin Cross-Trait Covariances differ by zygositySlide31

Saturated Model TestingSlide32

Bivariate Analysis

A Roadmap

1- Use the data to test basic assumptions inherent to standard

genetic models

Saturated Bivariate

Model

2- Estimate the

contributions of genetic and environmental factors to the covariance between two

traits

Bivariate Genetic Models (Bivariate Genetic Analysis via Cholesky Decomposition)Slide33

Genetic Modeling with Twin Data

a

c

a

c

MZ = 1

DZ = 0.5

1

A

C

Twin

1

Height

Twin

2

Height

e

e

E

E

C

ASlide34

a

11

a

21

c

11

c

22

c

21

e

11

e

21

e

22

a

11

a

22

a

21

c

11

c

22

c

21

e

11

e

21

e

22

MZ = 1

DZ = 0.5

MZ = 1

DZ = 0.5

1

1

C1

C2

C1

C2

Twin 1HeightTwin 1 WeightTwin 2HeightTwin 2WeightE1E2E1E2a22Bivariate Genetic ModelingA1A2A1A2Slide35

Building the

Bivariate Genetic Model

Sources

of Information

Cross

-trait covariance

within

individuals

Within-Twin CovarianceCross-trait covariance between twinsCross-Twin CovarianceMZ:DZ ratio of cross-trait covariance between twinsSlide36

Alternative RepresentationsSlide37
Slide38

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

V

X1

C

X1

Y1

Y

1

C

Y1

X1

V

Y1

twin 1

twin 1Slide39

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

a

11

2

C

X1

Y1

Y

1

C

Y1

X1

V

Y1

twin 1

twin 1Slide40

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

a

11

2

C

X1

Y1

Y

1

a

21

*a

11

V

Y1

twin 1

twin 1Slide41

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

a

11

2

a

21

*a

11

Y

1

a

21

*a

11

V

Y1

twin 1

twin 1Slide42

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

a

11

2

a

21

*a

11

Y

1

a

21

*a

11

a

22

2

+a

21

2

twin 1

twin 1Slide43

Bivariate Twin Covariance Matrix

X

1

Y

1

X

1

a

11

2

+

e

11

2

a

21

*a

11

+

e

21

*e

11

Y

1

a

21

*a

11+ e

21

*e

11

a

22

2

+

a

21

2

+

e

22

2

+e212twin 1twin 1Slide44

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

C

X2X1

C

X2

Y1

Y

2

C

Y2

X1

C

Y2Y1

twin 1

twin 2Slide45

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

1/0.5 * a

11

2

C

X2

Y1

Y

2

C

Y2

X1

C

Y2Y1

twin 1

twin 2Slide46

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

1/0.5 * a

11

2

C

X2

Y1

Y

2

1/0.5 * a

21

*a

11

C

Y2Y1

twin 2

twin 1Slide47

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

1/0.5 * a

11

2

1/0.5 * a

21

*a

11

Y

2

1/0.5 * a

21

*a

11

C

Y2Y1

twin 2

twin 1Slide48

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

1/0.5

*

a

11

2

1/0.5

*

a

21

*a

11

Y

2

1/0.5

*

a

21

*a

11

1/0.5

*

a

22

2

+

1/0.5

*

a

21

2

twin 2

twin 1Slide49

Bivariate Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Slide50

Predicted Twin Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

a

11

2

+

e

11

2

a

21

*a

11

+

e

21

*e

11

1/0.5

*

a

11

2

1/0.5

*

a

21

*a

11

Y

1

a

21

*a

11+ e21*e11a222+a212+ e222+e2121/0.5 * a21*a111/0.5*a222+1/0.5*a212X21/0.5* a1121/0.5 * a21*a11a112+e112 a21*a11+ e21*e11Y21/0.5 * a21*a11

1/0.5

*

a

22

2

+

1/0.5

*

a

21

2

a

21

*a

11

+

e

21

*e

11

a

22

2

+

a

21

2

+

e

22

2

+

e

21

2

twin 1

twin 1

twin 2

twin 2Slide51

Predicted MZ Twin Covariance

X

1

Y

1

X

2

Y

2

X

1

a

11

2

+

e

11

2

a

21

*a

11

+

e

21

*e

11

a

11

2

a

21

*a

11

Y

1

a

21

*a

11

+

e

21

*e11a222+a212+ e222+e212 a21*a11a222+a212X2a112a21*a11a112+e112 a21*a11+ e21*e11Y2 a21*a11a222+a212a21

*a

11

+

e21

*e

11

a

22

2

+

a

21

2

+

e

22

2

+

e

21

2

twin 1

twin 1

twin 2

twin 2Slide52

Predicted DZ Twin Covariance

X

1

Y

1

X

2

Y

2

X

1

a

11

2

+

e

11

2

a

21

*a

11

+

e

21

*e

11

0.5*a

11

2

0.5*a

21

*a

11

Y

1

a

21

*a

11

+

e

21

*e11a222+a212+ e222+e2120.5*a21*a110.5*a222+ 0.5* a212X20.5*a1120.5*a21*a11a112+e112 a21*a11+ e21*e11Y20.5*a21*a110.5*a222+ 0.5* a212a21

*a

11

+

e

21

*e

11

a

22

2

+

a

21

2

+

e

22

2

+

e

21

2

twin 1

twin 1

twin 2

twin 2Slide53

Predicted Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Variances of X & Y same across twins and zygosity groupsSlide54

Predicted Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Covariances of X & Y same across twins and zygosity groupsSlide55

Predicted Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Cross-Twin Within-Trait Covariances differ by zygositySlide56

Predicted Covariance Matrix

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2twin 1twin 1twin 2twin 2Cross-Twin Cross-Trait Covariances differ by zygositySlide57

OpenMx Specification

X

1

Y

1

X

2

Y

2

X

1

V

X1

C

X1

Y1

C

X1X2

C

X1

Y2

Y

1

C

Y1

X1

V

Y1

C

Y1

X2

C

Y1Y2

X

2

C

X2X1

C

X2

Y1

V

X2

C

X2

Y2Y2CY2X1CY2Y1CY2X2VY2OpenMx scriptSlide58

Read in and Transform Variable(s)

transform variables to make variances with similar order of magnitudes

# Load Data

data(

twinData

)

describe(

twinData

)

twinData[,'ht1'] <- twinData[,'ht1']*10twinData[,'ht2'] <- twinData[,'ht2'

]

*

10

twinData

[,

'wt1'

]

<-

twinData

[,

'wt1'

]

/

10

twinData

[,

'wt2'

]

<- twinData[,'wt2']/10# Select Variables for AnalysisVars <- c('ht','wt')nv <- 2 # number of variablesntv

<-

nv

*2

# number of total variablesselVars

<- paste(

Vars,c(rep(

1

,nv

),rep(

2

,

nv

)),sep="") #c('ht1','wt1,'ht2','wt2')# Select Data for AnalysismzData <- subset(twinData, zyg==1, selVars)dzData <- subset(twinData, zyg==3, selVars)Slide59

# Set Starting Values

svMe

<-

c(

15

,

5

)

# start value for meanslaMe <- paste(selVars,"Mean",sep="_")svPa <- .6 # start value for parameterssvPas <- diag(svPa,nv,nv)

laA

<-

paste(

"a"

,rev(

nv

+

1

-

sequence(

1

:

nv

)),rep(

1

:

nv

,

nv:1),sep="") # c("a11","a21","a22")laD <- paste("d",rev(nv+1-sequence(1:nv)),rep(1:nv,nv:1),sep

=""

)laC

<- paste(

"c"

,rev(nv

+1

-sequence(

1

:nv

)),rep(

1

:

nv

,nv:1),sep="")laE <- paste("e",rev(nv+1-sequence(1:nv)),rep(1:nv,nv:1),sep="")Start Values, LabelsMeans & Parameterscreate numbered labels to fill the lower triangular matrices with the first number corresponding to the variable being pointed to and the second number corresponding to the factor Slide60

Within-Twin Covariance [A]

Path Tracing:

Matrix Algebra: Lower 2x2

A

1

A

2

P

1

P2Slide61

# Matrices declared to store a, c, and e Path Coefficients

pathA

<-

mxMatrix( type

=

"Lower"

, nrow

=

nv, ncol=nv, free=T, values=svPas, label=laA, name="a" ) pathD <- mxMatrix( type="Lower", nrow=nv, ncol

=

nv

, free

=

T, values

=

svPas

, label

=

laD

, name

=

"d"

)

pathC

<-

mxMatrix( type

=

"Lower", nrow=nv, ncol=nv, free=F, values=0, label=laC, name="c" )pathE <- mxMatrix( type="Lower", nrow=nv, ncol=nv

, free

=T, values

=svPas

, label

=laE

, name=

"e"

)

# Matrices generated to hold A, C, and E computed Variance Components

covA

<-

mxAlgebra( expression

=

a %*% t(a), name="A" )covD <- mxAlgebra( expression=d %*% t(d), name="D" )covC <- mxAlgebra( expression=c %*% t(c), name="C" )covE <- mxAlgebra( expression=e %*% t(e), name="E" )Path CoefficientsVariance Componentsregular multiplication of lower triangular matrix and its transposeA1 A2P1P2a %*% t(a)Slide62

Within-Twin Covariance [A]+[E]

+

using matrix addition to generate total within-twin covarianceSlide63

# Algebra to compute total variances and standard deviations (diagonal only)

covP

<-

mxAlgebra( expression

=

A

+

D

+C+E, name="V" )matI <- mxMatrix( type="Iden", nrow=nv, ncol=nv, name="I"

)

invSD

<-

mxAlgebra( expression

=

solve(sqrt(

I

*

V

)), name

=

"iSD"

)

# Algebras generated to hold Parameter Estimates and Derived Variance Components

rowVars

<-

rep(

'vars',nv)colVars <- rep(c('A','D','C','E','SA','SD','SC','SE'),each=nv)estVars

<-

mxAlgebra( cbind(

A,

D,

C

,E

,A

/

V,

D/

V

,

C

/

V,E/V), name="Vars", dimnames=list(rowVars,colVars))Total VariancesVariance Componentseach of covariance matrices is of size nv x nvSlide64

Cross-Twin Covariances [A] & 0.5[A]

+

using Kronecker product to multiple every element of matrix by scalarSlide65

# Algebra for expected Mean and Variance/Covariance Matrices in MZ & DZ twins

meanG

<-

mxMatrix( type

=

"Full"

, nrow

=

1, ncol=nv, free=T, values=svMe, labels=laMe, name="Mean" )meanT

<-

mxAlgebra( cbind(

Mean

,

Mean

), name

=

"expMean"

)

covMZ

<-

mxAlgebra( rbind( cbind(

V

,

A

+

D

+

C), cbind(A+D+C , V )), name="expCovMZ" )covDZ <- mxAlgebra( rbind( cbind(V , 0.5%x%A+0.25%x%D+C),

cbind(

0.5%x%

A+

0.25

%x%D

+C

,

V )), name

="expCovDZ"

)

Expected Means

& Covariances

cbind creates two nv x ntv row matrices

rbind turns them into to ntv x ntv matrixSlide66

# Data objects for Multiple Groups

dataMZ

<-

mxData( observed

=

mzData

, type

=

"raw" )dataDZ <- mxData( observed=dzData, type="raw" )# Objective objects for Multiple GroupsobjMZ <- mxFIMLObjective( covariance="expCovMZ", means="expMean", dimnames=

selVars

)

objDZ

<-

mxFIMLObjective( covariance

=

"expCovDZ"

, means

=

"expMean"

, dimnames

=

selVars

)

# Combine Groups

pars

<-

list( pathA, pathD, pathC, pathE, covA, covD, covC, covE, covP, matI, invSD, estVars, meanG

, meanT

)

modelMZ

<-

mxModel( pars

, covMZ

,

dataMZ,

objMZ, name

=

"MZ"

)

modelDZ

<- mxModel( pars, covDZ, dataDZ, objDZ, name="DZ" )minus2ll <- mxAlgebra( expression=MZ.objective + DZ.objective, name="m2LL" )obj <- mxAlgebraObjective( "m2LL" )BivAceModel <- mxModel( "BivACE", pars, modelMZ, modelDZ, minus2ll, obj )Data, Objectives & Model Objectsexpected covariances and meansobserved dataSlide67

# Run Bivariate ACE model

BivAceFit

<-

mxRun(

BivAceModel

)

BivAceSum

<- summary(BivAceFit)BivAceSum$paround(BivAceFit@output$estimate,4)round(BivAceFit$Vars@result,4

)

BivAceSum

$

Mi

# Generate Output with Functions

source(

"GenEpiHelperFunctions.R"

)

parameterSpecifications(

BivAceFit

)

expectedMeansCovariances(

BivAceFit

)

tableFitStatistics(

BivAceFit

)

Parameter Estimates

Variance Components

two ways to get parameter estimatesprint pre-calculated unstandardized variance components and standardized variance componentsSlide68

Three Important

Results from Bivariate Genetic Analysis

Variance

Decomposition -> Heritability, (Shared) environmental influences

Covariance Decomposition -> The influences of genes and environment on the covariance between the two

variables

“How

much of the phenotypic correlation is accounted for by genetic

and environmental influences?”

Genetic and Environmental correlations -> the overlap in genes and environmental effects “Is there a large overlap in genetic/ environmental factors?Slide69

From Cholesky to Genetic Correlation

standardized solution = correlated factors solutionSlide70

Genetic Covariance to Genetic Correlation

calculated by dividing genetic covariance by

square root of product of genetic variances of two variablesSlide71

# Calculate genetic and environmental correlations

corA

<-

mxAlgebra( expression

=

solve(sqrt(

I

*

A))%&%A), name ="rA" )corD <- mxAlgebra( expression=solve(sqrt(I*D))%&%E), name ="rD" )

corC

<-

mxAlgebra( expression

=

solve(sqrt(

I

*

C

))%

&

%

C

), name

=

"rC"

)

corE

<- mxAlgebra( expression=solve(sqrt(I*E))%&%E), name ="rE" )Genetic CorrelationAlgebraSlide72

72

Contribution to Phenotypic Correlation

if rg=1, then two sets of genes overlap completely

if however, a11 and a22 are near to zero, genes do not contribute much to phenotypic correlation

contribution to phenotypic correlation is

function of both heritabilities and rgSlide73

Interpreting Results

High genetic correlation = large overlap in genetic effects on the two phenotypes

Does it mean that the phenotypic correlation between the traits is largely due to genetic effects?

No:

the substantive importance of a particular r

G

depends the value of the correlation

and

the value of the

A2 paths i.e. importance is also determined by the heritability of each phenotypeSlide74

Interpretation of Correlations

Consider two traits with a phenotypic correlation

(

r

P

) of

0.40 :

h

2

P1 = 0.7 and h2P2 = 0.6 with rG = .3Correlation due to additive genetic effects = ? Proportion of phenotypic correlation attributable to additive genetic effects = ? h2P1 = 0.2 and h2

P2

= 0.3 with

r

G

= 0.8

Correlation due to additive genetic effects =

?

Proportion of phenotypic correlation attributable to additive genetic effects =

?

Correlation due to A:

Divide by r

P

to find proportion of phenotypic correlation.Slide75

Bivariate Cholesky

Multivariate Cholesky