Longitudinal Modeling Nathan & Lindon Template_Developmental_Twin_Continuous_Matrix.R Template_Developmental_Twin_Ordinal_Matrix.R jepq.txt GenEpiHelperFunctions.R.

Slides:



Advertisements
Similar presentations
The STARTS Model David A. Kenny December 15, 2013.
Advertisements

SEM PURPOSE Model phenomena from observed or theoretical stances
Bivariate analysis HGEN619 class 2007.
Fitting Bivariate Models October 21, 2014 Elizabeth Prom-Wormley & Hermine Maes
Phenotypic factor analysis
Estimating “Heritability” using Genetic Data David Evans University of Queensland.
(Re)introduction to OpenMx Sarah Medland. Starting at the beginning  Opening R Gui – double click Unix/Terminal – type R  Closing R Gui – click on the.
Path Analysis Danielle Dick Boulder Path Analysis Allows us to represent linear models for the relationships between variables in diagrammatic form.
Multivariate Analysis Nick Martin, Hermine Maes TC21 March 2008 HGEN619 10/20/03.
Multivariate Genetic Analysis: Introduction(II) Frühling Rijsdijk & Shaun Purcell Wednesday March 6, 2002.
Developmental models. Multivariate analysis choleski models factor models –y =  f + u genetic factor models –P j = h G j + c C j + e E j –common pathway.
Longitudinal Modeling Nathan, Lindon & Mike LongitudinalTwinAnalysis_MatrixRawCon.R GenEpiHelperFunctions.R jepq.txt.
Multivariate Analysis Hermine Maes TC19 March 2006 HGEN619 10/20/03.
David M. Evans Sarah E. Medland Developmental Models in Genetic Research Wellcome Trust Centre for Human Genetics Oxford United Kingdom Twin Workshop Boulder.
Genetic Growth Curve Models Practica Boulder, March 2008 Irene Rebollo & Gitta Lubke & Mike Neale VU Amsterdam NL & Notre Dame, US & VCU, US.
Path Analysis Frühling Rijsdijk SGDP Centre Institute of Psychiatry King’s College London, UK.
Introduction to Multivariate Genetic Analysis Kate Morley and Frühling Rijsdijk 21st Twin and Family Methodology Workshop, March 2008.
Path Analysis Frühling Rijsdijk. Biometrical Genetic Theory Aims of session:  Derivation of Predicted Var/Cov matrices Using: (1)Path Tracing Rules (2)Covariance.
Karri Silventoinen University of Helsinki Osaka University.
Faculty drive folder Michel. Multivariate analysis Dorret I. Boomsma, Sanja Franic, Michel Nivard Factor analysis (FA) Measurement invariance (MI) Structural.
Standard genetic simplex models in the classical twin design with phenotype to E transmission Conor Dolan & Janneke de Kort Biological Psychology, VU 1.
Karri Silventoinen University of Helsinki Osaka University.
Continuously moderated effects of A,C, and E in the twin design Conor V Dolan & Sanja Franić (BioPsy VU) Boulder Twin Workshop March 4, 2014 Based on PPTs.
 Go to Faculty/marleen/Boulder2012/Moderating_cov  Copy all files to your own directory  Go to Faculty/sanja/Boulder2012/Moderating_covariances _IQ_SES.
Institute of Psychiatry King’s College London, UK
Introduction to Multivariate Genetic Analysis (2) Marleen de Moor, Kees-Jan Kan & Nick Martin March 7, 20121M. de Moor, Twin Workshop Boulder.
Introduction to OpenMx Sarah Medland. What is OpenMx? Free, Open-source, full–featured SEM package Software which runs on Windows, Mac OSX, and Linux.
Extending Simplex model to model Ph  E transmission JANNEKE m. de kort & C.V. DolAn Contact:
Cholesky decomposition May 27th 2015 Helsinki, Finland E. Vuoksimaa.
Univariate modeling Sarah Medland. Starting at the beginning… Data preparation – The algebra style used in Mx expects 1 line per case/family – (Almost)
Practical SCRIPT: F:\meike\2010\Multi_prac\MultivariateTwinAnalysis_MatrixRaw.r DATA: DHBQ_bs.dat.
Longitudinal Modeling Nathan Gillespie & Dorret Boomsma \\nathan\2008\Longitudinal neuro_f_chol.mx neuro_f_simplex.mx jepq6.dat.
G Lecture 7 Confirmatory Factor Analysis
G Lecture 81 Comparing Measurement Models across Groups Reducing Bias with Hybrid Models Setting the Scale of Latent Variables Thinking about Hybrid.
Threshold Liability Models (Ordinal Data Analysis) Frühling Rijsdijk MRC SGDP Centre, Institute of Psychiatry, King’s College London Boulder Twin Workshop.
Mx modeling of methylation data: twin correlations [means, SD, correlation] ACE / ADE latent factor model regression [sex and age] genetic association.
Developmental Models: Latent Growth Models Brad Verhulst & Lindon Eaves.
David M. Evans Multivariate QTL Linkage Analysis Queensland Institute of Medical Research Brisbane Australia Twin Workshop Boulder 2003.
SEM with Measured Genotypes NIDA Workshop VIPBG, October 2012 Maes, H. H., Neale, M. C., Chen, X., Chen, J., Prescott, C. A., & Kendler, K. S. (2011).
Welcome  Log on using the username and password you received at registration  Copy the folder: F:/sarah/mon-morning To your H drive.
More on thresholds Sarah Medland. A plug for OpenMx? Very few packages can handle ordinal data adequately… OpenMx can also be used for more than just.
Introduction to Multivariate Genetic Analysis Danielle Posthuma & Meike Bartels.
Developmental Models/ Longitudinal Data Analysis Danielle Dick & Nathan Gillespie Boulder, March 2006.
March 7, 2012M. de Moor, Twin Workshop Boulder1 Copy files Go to Faculty\marleen\Boulder2012\Multivariate Copy all files to your own directory Go to Faculty\kees\Boulder2012\Multivariate.
Multivariate Genetic Analysis (Introduction) Frühling Rijsdijk Wednesday March 8, 2006.
Extended Pedigrees HGEN619 class 2007.
Multivariate Analysis
Ordinal Data Sarah Medland.
Bivariate analysis HGEN619 class 2006.
Univariate Twin Analysis
Measurement invariance in the linear factor model: practical
Introduction to OpenMx
Introduction to Multivariate Genetic Analysis
Fitting Univariate Models to Continuous and Categorical Data
Re-introduction to openMx
MRC SGDP Centre, Institute of Psychiatry, Psychology & Neuroscience
Path Analysis Danielle Dick Boulder 2008
The Trait Model of Change
Modelos para datos longitudinales
Univariate modeling Sarah Medland.
(Re)introduction to Mx Sarah Medland
Longitudinal Modeling
Sarah Medland faculty/sarah/2018/Tuesday
More on thresholds Sarah Medland.
Bivariate Genetic Analysis Practical
Including covariates in your model
Multivariate Genetic Analysis
Multivariate Genetic Analysis: Introduction
Autoregressive and Growth Curve Models
Presentation transcript:

Longitudinal Modeling Nathan & Lindon Template_Developmental_Twin_Continuous_Matrix.R Template_Developmental_Twin_Ordinal_Matrix.R jepq.txt GenEpiHelperFunctions.R

Map changes in the magnitude of genetic & environmental influence across time ID same versus different genetic or environmental risks across development ID factors driving change versus factors maintaining stability Improve power to detect A, C & E - using multiple observations from the same individual & the cross twin cross trait correlations Why run longitudinal models?

Cholesky Decomposition - Advantages - Logical: organized such that all factors are constrained to impact later, but not earlier time points - Requires few assumptions, can predict any pattern of change - Disadvantages - Not falsifiable - No predictions - Feasible for limited number of measurements Latent Growth Curve Modeling Simplex Modeling Common methods for longitudinal data analyses in genetic epidemiology

Recap Common Pathway Model Latent Growth Models Simplex Models A caveat emptor or two from Lindon Layout

Phenotype ACAC C ECEC a 11 c 11 e 11 Common Path Phenotype 2 Phenotype 3 f 11 f 21 A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S Common Pathway

Common Pathway: Genetic components of variance Phenotype 1 1 ACAC a 11 Common Path Phenotype 2 Phenotype 3 f 11 f 21 A s2 A s3 A s1 111 f 11 f 21 f 31 a 11 X ’ & + = A a s11 a s22 a s33 a s11 a s22 a s33 X ’ # Specify a, c & e path coefficients from latent factors A, C & E to Common Pathway mxMatrix( type="Lower", nrow=nf, ncol=nf, free=TRUE, values=.6, name="a" ), # Specify a, c & e path coefficients from residual latent factors As, Cs & Es to observed variables i.e. specifics mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=4, name="as" ), # Specify factor loadings ‘f’ from Common Path to observed variables mxMatrix( type="Full", nrow=nv, ncol=nf, free=TRUE, values=15, name="f" ), # Matrices A, C, & E to compute variance components mxAlgebra( expression = f %&% (a %*% t(a)) + as %*% t(as), name="A" ), a s11 a s22 a s33

Common Pathway: Matrix algebra + variance components T1T1 T2T2 T1T1 A+C+E T2T2 Within twin (co)variance # Matrices to store a, c, and e path coefficients for latent phenotype(s) mxMatrix( type="Lower", nrow=nf, ncol=nf, free=TRUE, values=.6, name="a" ), mxMatrix( type="Lower", nrow=nf, ncol=nf, free=TRUE, values=.6, name="c" ), mxMatrix( type="Lower", nrow=nf, ncol=nf, free=TRUE, values=.6, name="e" ), # Matrices to store a, c, and e path coefficients for specific factors mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=4, name="as" ), mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=4, name="cs" ), mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=4, name="es" ), # Matrix f for factor loadings from common pathway to observerd phenotypes mxMatrix( type="Full", nrow=nv, ncol=nf, free=TRUE, values=15, name="f" ), # Matrices A, C, & E to compute variance components mxAlgebra( expression = f %&% (a %*% t(a)) + as %*% t(as), name="A" ), mxAlgebra( expression = f %&% (c %*% t(c)) + cs %*% t(cs), name="C" ), mxAlgebra( expression = f %&% (e %*% t(e)) + es %*% t(es), name="E" ),

1 / MZ T1T1 T2T2 T1T1 A+C+EA+C T2T2 A+C+E DZ T1T1 T2T2 T1T1 A+C T2T2 A+C+E Twin 1 Twin 2 # Algebra for expected variance/covariance covMZ <- mxAlgebra( expression= rbind( cbind( A+C+E, A+C), cbind( A+C, A+C+E)), name="expCovMZ" ) covMZ <- mxAlgebra( expression= rbind( cbind( A+C+E, 0.5%x%A+C), cbind(0.5%x%A+C, A+C+E)), name="expCovMZ" ) CP Model: Expected covariance

Got longitudinal data? Phenotype 1 Time 1 Phenotype 1 Time 2 Phenotype 1 Time 3 Do means & variance components change over time? - Are G & E risks stable? How to best explain change? - Linear, non-linear? One solution == Latent Growth Model Build LGC from scratch

Common Pathway Model 1 AIAI a 11 c 11 e 11 f 11 f 21 A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S CICI 1 EIEI f 31 m a s11 a s22 a s33 c s11 e s11 c s22 e s22 c s33 e s33 B

CPM to Latent Growth Curve Model 1 A1A1 a 11 c 11 e 11 f 11 f 21 A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S C1C1 1 E1E1 f 31 m1 a s11 a s22 a s33 c s11 e s11 c s22 e s22 c s33 e s33 B1B1 f 12 1 A2A2 a 22 c 22 e 22 f 22 f 32 1 C2C2 1 E2E2 m2 B2B2 f 11 f 21 f 31 f 11 f 12 f 21 f 22 f 31 f 32 a 11 c 11 e 11 a 11 a 22 c 11 c 22 e 11 e 22 nf <- 1 nf <- 2 Phenotype 1 Time 1 Phenotype 1 Time 2 Phenotype 1 Time 3

CP to Latent Growth Curve Model 1 A1A1 a 11 c 11 e 11 f 11 f 21 A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S C1C1 1 E1E1 f 31 a 21 c 21 e 21 m1 a s11 a s22 a s33 c s11 e s11 c s22 e s22 c s33 e s33 B1B1 f 12 1 A2A2 a 22 c 22 e 22 f 22 f 32 1 C2C2 1 E2E2 m2 B2B2 f 11 f 21 f 31 f 11 f 12 f 21 f 22 f 31 f 32 a 11 c 11 e 11 a 11 a 21 a 22 c 11 c 21 c 22 e 11 e 21 e 22 nf <- 1 nf <- 2 Phenotype 1 Time 1 Phenotype 1 Time 2 Phenotype 1 Time 3

Latent Growth Curve Model Phenotype 1 Time 1 1 AIAI a 11 c 11 e 11 Intercept Phenotype 1 Time 2 Phenotype 1 Time A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S CICI 1 EIEI 1 AsAs a 22 c 22 e 22 Slope CsCs 1 EsEs a 21 c 21 e 21 imim smsm a s11 a s22 a s33 c s11 e s11 c s22 e s22 c s33 e s33 Twin 1 BiBi BsBs Intercept: Factor which explains initial variance components (and mean) for all measures. Accounts for the stability over time. Slope: Factor which influences the rate of change in the variance components (and mean) over time. Slope(s) is (are) pre-defined: linear & non linear (quadratic, logistic, gompertz etc) hence factor loading constraints required.

Phenotype 1 Time 1 1 AIAI a 11 Intercept Phenotype 1 Time 2 Phenotype 1 Time A S2 A S3 A S AsAs a 22 Slope a 21 a s11 a s22 a s33 Twin 1 LGC Model: Within twin genetic components of variance a 11 a 21 a 22 a S11 a S22 a S Genetic pathway coefficients matrix Factor loading matrix Residual genetic pathway coefficients matrix

& + a 11 a 21 a 22 X a 11 a 21 a 22 ’ = A a S11 a S22 a S33 a S11 a S22 a S33 X ’ # Matrix for a path coefficients from latent factors to Int’ & Slope latent factors pathAl <- mxMatrix( type="Lower", nrow=nf, ncol=nf, free=TRUE, values=.6, labels=AlLabs, name="al" ) # Matrix for a path coefficients from residuals to observed phenotypes pathAs <- mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=4, labels=AsLabs, name="as" ) # Factor loading matrix of Int & Slop on observed phenotypes pathFl <- mxMatrix( type="Full", nrow=nv, ncol=nf, free=FALSE, values=c(1,1,1,0,1,2), name="fl" ) a a S11 2 = A var time 1 a a 21 a 11 + a 21 a 11 + a a S22 2 = A var time 2 a a 21 a a 21 a a a S33 2 = A var time 3 LGC Model: Specifying variance components in R # Matrix A to compute additive genetic variance components covA <- mxAlgebra( expression=fl %&% (al %*% t(al)) + as %*% t(as), name=“A”)

LGC Model: Specifying variance components in R

LGC Model: Specifying covariance components in R

LGC Model : 1.Continuous_Developmental_Twin_Matrix.R

Simplex Models Simplex designs model changes in the latent factor structure over time by fitting auto-regressive or Markovian chains Determine how much variation in a trait is caused by stable & enduring effects versus transient effects unique to each time The chief advantage of this model is the ability to partition environmental & genetic variation at each time point into: - genetic & environmental effects unique to each occasion - genetic and environmental effects transmitted from previous time points

Simplex Models innovations latent factor means latent factors observed phenotype measurement error Phenotype 1 Time 1 Phenotype 1 Time 2 Phenotype 1 Time 3 me 111 u 11 u 22 u 33 1 I1I1 i 11 LF I3I3 i 33 1 LF 3 1 I2I2 i 22 1 LF 2 lf 21 lf 32 b1b1 m1m1 b2b2 m2m2 b3b3 m3m3 means

Simplex Models: Within twin genetic variance ? ?? ??? ai 11 ai 22 ai 33 Transmission pathways Innovation pathways A1A1 A2A2 A3A3 A3A3 A2A2 A1A1

Simplex Models: Genetic variance matI <- mxMatrix( type="Iden", nrow=nv, ncol=nv, name="I”) pathAt <- mxMatrix( type="Lower", nrow=nv, ncol=nv, free=tFree, values=ValsA, labels=AtLabs, name="at" ) pathAi <- mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=iVals, labels=AiLabs, name="ai" ) covA <- mxAlgebra( expression=solve( I - at ) %&% ( ai %*% t(ai)), name="A" ) at at 32 0 & ai 11 ai 22 ai 33 - = A ai 11 ai 22 ai 33 * ’ at at 32 0 ai 11 ai 22 ai 33 Transmission pathways Innovation pathways A1A1 A2A2 A3A3 A3A3 A2A2 A1A1

Simplex Models: E variance + measurement error matI <- mxMatrix( type="Iden", nrow=nv, ncol=nv, name="I”) pathEt <- mxMatrix( type="Lower", nrow=nv, ncol=nv, free=tFree, values=tValsE, labels=EtLabs, name="et" ) pathEi <- mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, values=iVals, labels=EiLabs, name="ei" ) pathMe <- mxMatrix( type="Diag", nrow=nv, ncol=nv, free=TRUE, labels=c("u","u","u"), values=5, name="me" ) covE <- mxAlgebra( expression=solve( I-et ) %&% (ei %*% t(ei))+ (me %*% t(me)), name="E" ) et et 32 0 & ei 11 ei 22 ei 33 - ~ = E ei 11 ei 22 ei 33 * ’ u 11 u 22 u 33 u 11 u 22 u 33 * ’ +

LGC Model: Specifying covariance components in R

Simplex Models: Means & sex in R Time 1Time 2Time 3 m1m2m3

Simplex Model : 1.Continuous_Developmental_Twin_Matrix.R

Phenotype 1 Time 1 1 AIAI a 11 c 11 e 11 Intercept Phenotype 1 Time 2 Phenotype 1 Time A S2 C S2 E S2 A S3 C S3 E S3 A S1 C S1 E S CICI 1 EIEI 1 AsAs a 22 c 22 e 22 Slope CsCs 1 EsEs a 21 c 21 e 21 imim smsm a s11 a s22 a s33 c s11 e s11 c s22 e s22 c s33 e s33 BiBi BsBs Ordinal Data Latent Growth Curve Modeling

Two tasks: 1.Estimate means 2.Fix thresholds Assumes Measurement Invariance

Phenotype 1 Time 1 Intercept Phenotype 1 Time 2 Phenotype 1 Time Slope ImIm SmSm MeansIS <- mxMatrix( type="Full", nrow=2, ncol=1, free=T, labels=c("Im","Sm"), values=c(5,2), name="LMeans" ) pathB<- mxMatrix( type="Full", nrow=2, ncol=1, free=T, values=c(5,2), labels=c("Bi","Bs"), name="Beta" ) pathFl <- mxMatrix( type="Full", nrow=nv, ncol=nf, free=FALSE, values=c(1,1,1,0,1,2), labels=FlLabs,name="fl" ) # Read in covariates defSex1 <- mxMatrix( type="Full", nrow=1, ncol=1, free=FALSE, labels=c("data.sex_1"), name="Sex1") Twin 1 BiBi BsBs LGC Model: Estimating means (& sex) in R BiBi BsBs imim smsm Means on observed phenotypes versus means on Intercept & Slope?

Phenotype 1 Time 1 Intercept Phenotype 1 Time 2 Phenotype 1 Time Slope ImIm SmSm Means1 <- mxAlgebra( expression= ( t((fl %*% ( LMeans - Sex1 %x% Beta )))), name="Mean1") X imim smsm BiBi BsBs Sex T1 BiBi = Expected means for Twin 1 i m + B i Sex T1 s m + B s Sex T1 X (i m + B i Sex T1 ) (i m + B i Sex T1 ) + 1 (s m + B s Sex T1 ) (i m + B i Sex T1 ) + 2 (s m + B s Sex T1 ) = Time 1 Time 2 Time 3 Twin 1 LGC Model: Means Algebra

LGC: Threshold Invariance or Fixed Thresholds

LGC Model : 2.Ordinal_Template_Developmental_Twin_Matrix.R

Dual Change Models Simplex + LGC