GENETIC ANALYSIS OF BINARY and CATEGORICAL TRAITS PART ONE
TABLE 1. Twin Pair Concordances for Major Depression (Virginia Twin Study data, adapted from Neale and Cardon, 1992) MZ FEMALE PAIRSDZ FEMALE PAIRS Twin B UnaffectedAffectedUnaffectedAffected Twin A - Unaffected32983 Twin A - Unaffected Affected Affected8263
Prevalence= e.g. for MZ pairs= e.g. for DZ pairs= Prevalance = proportion of affected (alcoholic) twins in the general population. 2 x concordant affected pairs + discordant pairs 2 x Total Pairs = 29.2% = 34.3%
Probandwise concordance rate= e.g. for MZ pairs= e.g. for DZ pairs= Probandwise concordance rate = probability that cotwin of a depressed twin will also have a history of depression. 2 x concordant affected pairs 2 x concordant affected pairs + discordant pairs = 48.3% = 41.7%
Why do we have (2 x number of concordant affected pairs) in the numerator and denominator of the expression for the probandwise concordance rate? Consider a simple example where there are 4 affected individuals, who came from 3 twin pairs, ie, 1 — 01 — 01 — 1 There are 4 potential probands, so if we randomly select an affected individual, the probability that the cotwin of that individual is also affected will be 50%
Recurrence Risk-ratio Probandwise concordance rate Prevalence = e.g. for MZ pairs== 1.65 e.g. for DZ pairs==
Odds Ratios -for binary data, a widely used measure of association, especially in epidemiology ab cd Odds Ratio = a x d b x c MZ Odds Ratio for depression :3.46 DZ Odds Ratio for depression: 1.64 Also can be estimated via a multiple logistic regression model to allow statistical control for covariates. In some applications, a probit model may be used instead (see later) – in general, logistic regression and probit regression models lead to almost identical conclusions about the statistical significance of an association.
TABLE 1a. Twin Pair Concordances for Alcohol Dependence (DSM-IIIR) (Virginia Twin Study data, from Kendler et al., 1992) MZ Female Pairs DZ Female Pairs N pairs Population prevalence8.1%10.2% Probandwise concordance31.6%24.4%
Number of concordant alcoholic pairs =N pairs x prevalence x probandwise concordance MZ:15 pairsDZ:11 pairs Number of discordant pairs =2 x N pairs x prevalence x (1 - probandwise concordance) MZ:65 pairsDZ:68 pairs Number of concordant unaffected pairs MZ:510 pairsDZ:361 pairs
Alcoholism Risk UNAFFECTEDAFFECTED a) Normal Liability Threshold Model b) Multiple-threshold Model UNAFFECTED MILD CASES SEVERE CASES t t 1 t 1
Threshold value (t) Prevalence (area under the standard normal curve) 0.050% % % % % % 1.645% % 2.331% % % CUMULATIVE NORMAL FREQUENCY DISTRIBUTION
Table 3. Population distribution of pairs of relatives with both alcoholic, neither alcoholic, or only one relative alcoholic, as a function of (i) lifetime prevalence of alcoholism, and (ii) liability correlation for alcoholism in relatives PREVALENCE Relative ARelative B Liability correlation Both affected Discordant A affected B affected Both unaffected Risk to relative of an alcoholic a Relatives’ Recurrence Risk Ratio (%) 30% % % a i.e. Probandwise concordance rate
EXAMPLE DATA-FILE FOR MX RAW ORDINAL DATA: MZF DEPRESSION DATA (depmzf.rec) Twin ATwin BFrequency See MX manual for fit function (pp 89-90)
EXAMPLE DATA-FILE (II): DERIVED FROM PUBLISHED SOURCES MZF ALCOHOL DEPENDENCE DATA (alcmzf.rec)
! tetrachoric.mx ! estimating tetrachoric correlations #define nvar 1 #define maxthresf 1 ! number of thresholds Analysis of depression data: estimating tetrachorics & confidence intervals data NI=3 NG=4 LAbels twina twinb countmz Ordinal fi=depmzf.rec ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! Definition_variables countmz / Begin matrices; W LO nvar nvar fr ! w*w' is the tetrachoric correlation Y LO nvar nvar fr ! y*y' is 1-tetrachoric correlation M FU maxthresf nvar fi! this is where we will store the thresholds S DI nvar nvar ! Matrix that will store weight variable end matrices; SP M 3 MATRIX M ! This tells MX to store the definition variable count in S SP S -1 mat w 0.7 mat y 0.7
Begin algebra; R=W*W'; E=Y*Y'; V=R+E; end algebra; FREQ S; ! tells MX that S contains the weight (frequency) variable TH M|M; ! tells MX that row and column thresholds contained in M|M CO V|R_ R'|V; ! formula for correlation matrix! bo y(1,1) bo w(1,1) bo m(1,1) interval r(1,1) ! compute 95% confidence interval for correlation OPT func=1.E-12 OPT RS END
Analysis of depression data: DZm data NI=3 LAbels twina twinb countdz OR fi=depdzf.rec Definition_variables countdz / Begin matrices; W LO nvar nvar fr ! w*w' is the tetrachoric correlation for DZ group Y LO nvar nvar fr ! y*y' is 1-tetrachoric correlation for DZ group N FU maxthresf nvar fr S DI nvar nvar ! Matrix that will store weight variable end matrices; SP N 6 MATRIX N SP S -1 mat w 0.6 mat y 0.8 Begin algebra; R=W*W'; E=Y*Y'; V=R+E; end algebra; FREQ S; TH N|N; CO V|R_R'|V; bo y(1,1) bo w(1,1) bo n(1,1) interval r(1,1) ! compute 95% confidence interval for correlation OPT RS END
Constraint function - constrain variances to unity for MZ group CO NI=1 Begin matrices = group 1; U unit 1 nvar end matrices; CO \d2v(V) = u; end Constraint function - constrain variances to unity for DZ group CO NI=1 Begin matrices = group 2; U unit 1 nvar end matrices; CO \d2v(V) = u; end
Summary of VL file data for group 1 COUNTMZ TWINA TWINB Code E E E+00 Number E E E+00 Mean E E E-01 Variance E E E-01 Minimum E E E+00 Maximum E E E+00 Summary of VL file data for group 2 COUNTDZ TWINA TWINB Code Number Mean Variance Minimum Maximum
PARAMETER SPECIFICATIONS GROUP NUMBER: 1 Analysis of depression data: estimating tetrachorics & confidence intervals MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX M This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by
GROUP NUMBER: 2 Analysis of ordinal alcohol tolerance and dependence data: DZm MATRIX E This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX N This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 It has no free parameters specified MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of depression data: estimating tetrachorics & confidence intervals MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX M This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E]
MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 2 Analysis of ordinal alcohol tolerance and dependence data: DZm MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX N This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E]
MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
Your model has 6 estimated parameters and 18 Observed statistics Observed statistics include 2 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 12 1 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail R Confidence intervals requested in group 2 Matrix Element Int. Estimate Lower Upper Lfail Ufail R This problem used 0.2% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.11 Execution 0: 0: 0: 2.85 TOTAL 0: 0: 0: 2.96 Total number of warnings issued: 0 ______________________________________________________________________________
** Mx startup successful ** **MX-Sunos version 1.49** ! tetra2.mx ! estimating tetrachoric correlations The following MX script lines were read for group 1 #DEFINE NVAR 1 #DEFINE MAXTHRESF 1 ! NUMBER OF THRESHOLDS ANALYSIS OF ALCOHOLISM DATA: ESTIMATING TETRACHORICS & CONFIDENCE INTERVALS DATA NI=3 NO=2 NG=4 LABELS TWINA TWINB COUNTMZ ORDINAL FI=ALCMZF.REC Ordinal data read initiated NOTE: Rectangular file contained 4 records with data ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! DEFINITION_VARIABLES COUNTMZ / NOTE: Definition yields 4 data vectors for analysis NOTE: Vectors contain a total of 8 observations
Summary of VL file data for group 1 COUNTMZ TWINA TWINB Code E E E+00 Number E E E+00 Mean E E E-01 Variance E E E-01 Minimum E E E+00 Maximum E E E+00 Summary of VL file data for group 2 COUNTDZ TWINA TWINB Code E E E+00 Number E E E+00 Mean E E E-01 Variance E E E-01 Minimum E E E+00 Maximum E E E+00
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of alcoholism data: estimating tetrachorics & confidence intervals MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX M This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX S This is a DIAGONAL matrix of order 1 by
MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E] MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 2 Analysis of ordinal alcohol tolerance and dependence data: DZm MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX N This is a FULL matrix of order 1 by MATRIX R This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 [=R+E]
MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by Your model has 6 estimated parameters and 18 Observed statistics Observed statistics include 2 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 12 1 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail R Confidence intervals requested in group 2 Matrix Element Int. Estimate Lower Upper Lfail Ufail R This problem used 0.2% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.11 Execution 0: 0: 0: 3.41 TOTAL 0: 0: 0: 3.52 Total number of warnings issued: 0
ESTIMATED TETRACHORIC CORRELATIONS (estimating separate thresholds for each zygosity group) DEPRESSION ALCOHOL DEPENDENCE ρ95% CIρ MZF DZF log-likelihood
TEST FOR ZYGOSITY DIFFERENCE IN PREVALENCE (takes into account non-independence!) DEPRESSION ALCOHOL DEPENDENCE -2 ln L (i)Separate thresholds model (ii)Equal thresholds Heterogeneity (i - ii)χ 2 = 5.265, p=0.02χ 2 = 2.408, p=
This approach extends naturally to fitting univariate genetic models.
! univariate.mx ! fitting a univariate genetic model to 2x2 data #define nvar 1 #define maxthresf 1 ! number of thresholds Analysis of depression data: fitting ACE model data NI=3 NG=3 LAbels twina twinb countmz Ordinal fi=depmzf.rec ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! Definition_variables countmz / Begin matrices; W LO nvar nvar fr ! additive genetic path (A=w*w') X LO nvar nvar fr ! shared environmental path (C=x*x') Y LO nvar nvar fr ! non-shared environmental path (E=y*y') Z LO nvar nvar fi ! non-additive genetic path (D=z*z') M FU maxthresf nvar fi ! matrix of thresholds S DI nvar nvar ! Matrix that will store weight variable end matrices; SP M 4 MATRIX M ! This tells MX to store the definition variable count in S SP S -1 mat w 0.5 mat x 0.5 mat y 0.7
Begin algebra; A=W*W'; C=X*X'; E=Y*Y'; D=Z*Z'; V=A+C+D+E; end algebra; FREQ S; ! tells MX that S contains the weight (frequency) variable TH M|M; ! tells MX that row and column thresholds contained in M|M CO V|A+D+C_ A'+D'+C'|V; ! formula for correlation matrix! bo y(1,1) bo w(1,1) x(1,1) bo m(1,1) interval a(1,1) c(1,1) e(1,1) ! compute 95% confidence interval for correlation OPT func=1.E-12 OPT RS END
Analysis of depression data: DZm data NI=3 NO=4 LAbels twina twinb countdz OR fi=depdzf.rec Definition_variables countdz / Begin matrices = group 1; S DI nvar nvar ! Matrix that will store weight variable g DI 1 1 ! constant (=0.5) for coefficient of additive genetic component h DI 1 1 ! constant (=0.25) for coefficient of dominance genetic component n FU maxthresf nvar fi ! matrix of thresholds end matrices; SP N 5 MATRIX N MAT g 0.5 MAT h 0.25 SP S -1 FREQ S; TH N|N; CO ! formula for correlation matrix! bo n(1,1) OPT RS END
Constraint function - constrain variance to unity CO NI=1 Begin matrices = group 1; U unit 1 nvar end matrices; CO \d2v(V) = u; end
** Mx startup successful ** **MX-Sunos version 1.49** ! univariate.mx ! fitting a univariate genetic model to 2x2 data The following MX script lines were read for group 1 #DEFINE NVAR 1 #DEFINE MAXTHRESF 1 ! NUMBER OF THRESHOLDS ANALYSIS OF DEPRESSION DATA: FITTING ACE MODEL DATA NI=3 NO=2 NG=3 LABELS TWINA TWINB COUNTMZ ORDINAL FI=DEPMZF.REC Ordinal data read initiated NOTE: Rectangular file contained 4 records with data ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! DEFINITION_VARIABLES COUNTMZ / NOTE: Definition yields 4 data vectors for analysis NOTE: Vectors contain a total of 8 observations BEGIN MATRICES; W LO NVAR NVAR FR ! ADDITIVE GENETIC PATH (A=W*W') X LO NVAR NVAR FR ! SHARED ENVIRONMENTAL PATH (C=X*X') Y LO NVAR NVAR FR ! NON-SHARED ENVIRONMENTAL PATH (E=Y*Y') Z LO NVAR NVAR FI ! NON-ADDITIVE GENETIC PATH (D=Z*Z') M FU MAXTHRESF NVAR FI ! MATRIX OF THRESHOLDS S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE END MATRICES;
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of depression data: fitting ACE model MATRIX A This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX C This is a computed FULL matrix of order 1 by 1 [=X*X'] E-08 MATRIX D This is a computed FULL matrix of order 1 by 1 [=Z*Z'] MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX M This is a FULL matrix of order 1 by
MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 [=A+C+D+E] MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX X This is a LOWER TRIANGULAR matrix of order 1 by E-04 MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Z This is a LOWER TRIANGULAR matrix of order 1 by
Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
Your model has 5 estimated parameters and 17 Observed statistics Observed statistics include 1 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 12 3 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail A C E This problem used 0.1% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.10 Execution 0: 0: 0:15.76 TOTAL 0: 0: 0:15.86 Total number of warnings issued: 1 ______________________________________________________________________________
** Mx startup successful ** **MX-Sunos version 1.49** ! univar2.mx ! fitting a univariate genetic model to 2x2 data The following MX script lines were read for group 1 #DEFINE NVAR 1 #DEFINE MAXTHRESF 1 ! NUMBER OF THRESHOLDS ANALYSIS OF ALCOHOL DEPENDENCE DATA: FITTING ACE MODEL DATA NI=3 NO=2 NG=3 LABELS TWINA TWINB COUNTMZ ORDINAL FI=ALCMZF.REC Ordinal data read initiated NOTE: Rectangular file contained 4 records with data ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 2x2 table ! DEFINITION_VARIABLES COUNTMZ / NOTE: Definition yields 4 data vectors for analysis NOTE: Vectors contain a total of 8 observations
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of alcohol dependence data: fitting ACE model MATRIX A This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX C This is a computed FULL matrix of order 1 by 1 [=X*X'] MATRIX D This is a computed FULL matrix of order 1 by 1 [=Z*Z'] MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y']
MATRIX M This is a FULL matrix of order 1 by MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX V This is a computed FULL matrix of order 1 by 1 [=A+C+D+E] MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX X This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Z This is a LOWER TRIANGULAR matrix of order 1 by
Matrix of EXPECTED thresholds TWINA TWINB Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
Your model has 5 estimated parameters and 17 Observed statistics Observed statistics include 1 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 12 3 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail A C E This problem used 0.1% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.10 Execution 0: 0: 0: 7.55 TOTAL 0: 0: 0: 7.65 Total number of warnings issued: 1 ______________________________________________________________________________
VIRGINIA TWIN STUDY: Female Like-Sex Pairs Summary Model-Fitting Results Additive Genetic Variance 95% CI Shared Environmental Variance 95% CI Non-Shared Environmental Variance 95% CI Major depression Alcohol dependence
Model-fitting results: Depression in the Virginia Twin Study Parameter Estimates (%) Likelihood-ratio versus ACE model ModelACEDd.f.χ2χ2 p A D E A C E A E C E E
We can easily handle data where only one twin has responded. HOWEVER, we are assuming that missing data are MCAR - Missing Completely at Random. We can include twins with missing cotwins (indicated by.) in the same data-file as complete pairs. Alternatively, if we want to test for differences in prevalence for complete pairs versus singles (suggestive of an ascertainment bias), we can include singleton twins as separate groups, allowing a test of equality of thresholds. Singleton Twins?
EXAMPLE: Alcohol Dependence Data from 1992 Survey of the Australian Twin Panel (1981 cohort) MZ MaleDZ Male
Table 2. Numbers of twin pairs concordant and discordant for smoking status in the Australian twin panel 1981 survey. MZ Female (N=1232 pairs)DZ Female (N=747 pairs) IIIIIIIIIIII INon-smoker IISuccessful quitter IIICurrent smoker MZ Male (N=567 pairs)DZ Male (N=350 pairs) IIIIIIIIIIII INon-smoker IISuccessful quitter IIICurrent smoker
MULTIPLE THRESHOLD MODEL For n categories, we need to estimate (n-1) thresholds. The safest way to estimate multiple thresholds is to estimate: t 0 t 1 = t 0 + t 1 (t 1 > 0) t 2 = t 1 + t 2 (t 2 > 0) and so on. This is especially important when we estimate confidence intervals. Note that if L = andM = then LM = etc. Hence, we merely need to constrain t 1 etc. > 0.
! univariate3x3.mx ! fitting a univariate genetic model to 3x3 data #define nvar 1 #define maxthresf 2 ! number of thresholds Analysis of smoking data: fitting ACE model data NI=3 NG=3 LAbels twina twinb countmz Ordinal fi=smkmzf.rec ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 3x3 table ! Definition_variables countmz / Begin matrices; W LO nvar nvar fr ! additive genetic path (A=w*w') X LO nvar nvar fr ! shared environmental path (C=x*x') Y LO nvar nvar fr ! non-shared environmental path (E=y*y') Z LO nvar nvar fi ! non-additive genetic path (D=z*z') M FU maxthresf nvar fi ! matrix of thresholds L LO maxthresf maxthresf ! used to ensure t1 < t2 S DI nvar nvar ! Matrix that will store weight variable end matrices; SP M 4 5 MATRIX M
MATRIX L ! This tells MX to store the definition variable count in S SP S -1 mat w 0.5 mat x 0.5 mat y 0.7 Begin algebra; A=W*W'; C=X*X'; E=Y*Y'; D=Z*Z'; V=A+C+D+E; T=L*M; end algebra; FREQ S; ! tells MX that S contains the weight (frequency) variable TH T|T; ! tells MX that row and column thresholds contained in T|T CO V|A+D+C_ A'+D'+C'|V; ! formula for correlation matrix! bo y(1,1) m(2,1) bo w(1,1) x(1,1) bo m(1,1) interval a(1,1) c(1,1) e(1,1) ! compute 95% confidence interval for correlation OPT func=1.E-12 OPT RS END
Analysis of ordinal smoking data: DZm data NI=3 X LAbels twina twinb countdz OR fi=smkdzf.rec Definition_variables countdz / Begin matrices = group 1; S DI nvar nvar ! Matrix that will store weight variable g DI 1 1 ! constant (=0.5) for coefficient of additive genetic component h DI 1 1 ! constant (=0.25) for coefficient of dominance genetic component n FU maxthresf nvar fi ! matrix of thresholds end matrices; SP N 6 7 MATRIX N MAT g 0.5 MAT h 0.25 SP S -1 Begin algebra; T=L*N; end algebra; FREQ S; TH T|T; CO ! formula for correlation matrix! bo n(1,1) bo n(2,1) OPT RS END
Constraint function - constrain variances to unity CO NI=1 Begin matrices = group 1; U unit 1 nvar end matrices; CO \d2v(V) = u; end
** Mx startup successful ** **MX-Sunos version 1.49** ! univariate3x3.mx ! fitting a univariate genetic model to 3x3 data The following MX script lines were read for group 1 #DEFINE NVAR 1 #DEFINE MAXTHRESF 2 ! NUMBER OF THRESHOLDS ANALYSIS OF SMOKING DATA: FITTING ACE MODEL DATA NI=3 NO=9 NG=3 LABELS TWINA TWINB COUNTMZ ORDINAL FI=SMKMZF.REC Ordinal data read initiated NOTE: Rectangular file contained 9 records with data and 1 records where all data were missing ! Count is a definition variable that we use to tell MX the frequency count ! for each element of the 3x3 table ! DEFINITION_VARIABLES COUNTMZ / NOTE: Definition yields 9 data vectors for analysis NOTE: Vectors contain a total of 18 observations BEGIN MATRICES; W LO NVAR NVAR FR ! ADDITIVE GENETIC PATH (A=W*W') X LO NVAR NVAR FR ! SHARED ENVIRONMENTAL PATH (C=X*X') Y LO NVAR NVAR FR ! NON-SHARED ENVIRONMENTAL PATH (E=Y*Y') Z LO NVAR NVAR FI ! NON-ADDITIVE GENETIC PATH (D=Z*Z') M FU MAXTHRESF NVAR FI ! MATRIX OF THRESHOLDS L LO MAXTHRESF MAXTHRESF ! USED TO ENSURE T1 < T2 S DI NVAR NVAR ! MATRIX THAT WILL STORE WEIGHT VARIABLE END MATRICES;
Summary of VL file data for group 1 COUNTMZ TWINA TWINB Code E E E+00 Number E E E+00 Mean E E E+00 Variance E E E-01 Minimum E E E+00 Maximum E E E+00 Summary of VL file data for group 2 COUNTDZ TWINA TWINB Code Number Mean Variance Minimum Maximum
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of smoking data: fitting ACE model MATRIX A This is a computed FULL matrix of order 1 by 1 [=W*W'] MATRIX C This is a computed FULL matrix of order 1 by 1 [=X*X'] MATRIX D This is a computed FULL matrix of order 1 by 1 [=Z*Z'] MATRIX E This is a computed FULL matrix of order 1 by 1 [=Y*Y'] MATRIX L This is a LOWER TRIANGULAR matrix of order 2 by
MATRIX M This is a FULL matrix of order 2 by MATRIX S This is a DIAGONAL matrix of order 1 by MATRIX T This is a computed FULL matrix of order 2 by 1 [=L*M] MATRIX V This is a computed FULL matrix of order 1 by 1 [=A+C+D+E] MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX X This is a LOWER TRIANGULAR matrix of order 1 by
MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Z This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
MATRIX W This is a LOWER TRIANGULAR matrix of order 1 by MATRIX X This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Y This is a LOWER TRIANGULAR matrix of order 1 by MATRIX Z This is a LOWER TRIANGULAR matrix of order 1 by Matrix of EXPECTED thresholds TWINA TWINB Threshold Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX TWINA TWINB TWINA TWINB Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
Your model has 7 estimated parameters and 37 Observed statistics Observed statistics include 1 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 30 3 Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail A C E This problem used 0.1% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.24 Execution 0: 0: 0:29.75 TOTAL 0: 0: 0:30.00 Total number of warnings issued: 2 ______________________________________________________________________________
SMOKING IN WOMEN %95% CI Additive genetic variance Shared environmental variance Non-shared environmental variance log-likelihood
BIVARIATE GENETIC APPLICATIONS It is a simple step to modify the univariate script to allow for bivariate (or even trivariate) genetic analyses. If the traits being analyzed have varying numbers of thresholds, maxthres will be the maximum number of thresholds, and we will have, say, MATM In the next example, we analyze Australian twin data on lifetime history of major depression and current smoking status. Here, the original raw data are given in depsmkmf.rec and depsmkdf.rec. Notice that the data have been sorted -- this will improve the efficiency of the MX run.
! ordinal_bivariate.mx #define nvar 2 #define nvar2 4 #define maxthres 2 Analysis of ordinal depression (0/1) and smoking ! initiation/persistence (0/1/2) data NI=nvar2 NG=3 Ordinal fi=depsmkmf.rec Begin matrices; M FU maxthres nvar fr L LO maxthres maxthres W LO nvar nvar fr X LO nvar nvar fr Y LO nvar nvar fr end matrices; MAT L MATRIX M SP M st 0.7 y(1,1) y(2,2) w(1,1) w(2,2) st 0.2 x(1,1) x(2,2) st 0.2 w(2,1) x(2,1) y(2,1)
Begin algebra; A=W*W'; O=\stnd(A); C=X*X'; r=\stnd(C); E=Y*Y'; q=\stnd(E); P=A+C+E; end algebra; TH L*M|L*M; CO P | A + C _ A' + C' | P ; bo y(1,1) y(2,2) bo x(1,1) x(2,2) w(1,1) w(2,2) bo x(2,1) y(2,1) w(2,1) bo m(2,2) bo m(1,1) ! interval a(1,1) a(2,2) c(1,1) c(2,2) e(1,1) e(2,2) o(1,2) r(1,2) q(1,2) OPT func=1.E-12 OPT RS END
Analysis of ordinal depression and smoking data: DZF data NI=nvar2 Ordinal fi=depsmkdf.rec Begin matrices = group 1; N FU maxthres nvar fr g fu 1 1 end matrices; MATRIX N SP N mat g 0.5 TH L*N | L*N ; CO P | + C _ + C' | P ; bo n(2,2) bo n(1,1) OPT RS END
Data constraint CO NI=1 Begin matrices = group 1; U unit 1 nvar end matrices; CO \d2v(P) = u; end
Summary of VL file data for group 1 Code Number Mean Variance Minimum Maximum Summary of VL file data for group 2 Code Number Mean Variance Minimum Maximum
*** WARNING! *** I am not sure I have found a solution that satisfies Kuhn-Tucker conditions for a minimum. NAG's IFAIL parameter is 6 Looks like I got stuck here. Check the following: 1. The model is correctly specified 2. Starting values are good 3. You are not already at the solution The error can arise if the Hessian is ill-conditioned You can try resetting it to an identity matrix and fit from the solution by putting TH=-n on the OU line where n is the number of refits that you want to do If all else fails try putting NAG=30 on the OU line and examine the file NAGDUMP.OUT and the NAG manual
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of ordinal depression (0/1) and smoking initiation/persistence (0/1/2) MATRIX A This is a computed FULL matrix of order 2 by 2 [=W*W'] MATRIX C This is a computed FULL matrix of order 2 by 2 [=X*X'] E E E E-01 MATRIX E This is a computed FULL matrix of order 2 by 2 [=Y*Y'] MATRIX L This is a LOWER TRIANGULAR matrix of order 2 by
MATRIX M This is a FULL matrix of order 2 by MATRIX O This is a computed FULL matrix of order 2 by 2 [=\STND(A)] MATRIX P This is a computed FULL matrix of order 2 by 2 [=A+C+E] MATRIX Q This is a computed FULL matrix of order 2 by 2 [=\STND(E)]
MATRIX R This is a computed FULL matrix of order 2 by 2 [=\STND(C)] MATRIX W This is a LOWER TRIANGULAR matrix of order 2 by MATRIX X This is a LOWER TRIANGULAR matrix of order 2 by E E E-01 MATRIX Y This is a LOWER TRIANGULAR matrix of order 2 by
Matrix of EXPECTED thresholds Threshold Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
*** WARNING! *** Minimization may not be successful. See above CODE RED - Hessian/precision problem Your model has 15 estimated parameters and 7333 Observed statistics Observed statistics include 2 constraints. -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> 7318 This problem used 1.2% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 6.63 Execution 0: 0: 5:18.42 TOTAL 0: 0: 5:25.04 Total number of warnings issued: 2 ______________________________________________________________________________
Controlling for Covariates An advantage of fitting models to raw (binary or ordinal) data is that we can simultaneously control for covariates (e.g., age) while fitting genetic models. To do this, we need to include covariates as “definition variables” in our analysis, and simultaneously model the “probit” regression of liability on covariates, so that we are now testing for genetic effects on the residual variance in the outcome of interest. This approach can also be extended to test for genotype x environment interaction effects (beyond the scope of this workshop)! Previously, we have directly estimated threshold values t that are assumed to be the same for al individuals of a given gender (and sometimes zygosity group). Now we must allow thresholds to differ between individuals as a function of their covariate values C i1, C i2, etc. t i = t o – B 1 C i1 – B 2 C i2, etc. The regression coefficients B 1, B 2, etc. are probit regression coefficients – thus good starting values can be obtained from standard statistical software such STATA. In the next program, we estimate probit regression coefficients and residual twin pair correlation.
Analysis of regression of alcdep on conduct (broad), majdep, panatt ! /data2/boulder/probitmult_withpairs.mx ! Second group is DZF complete pairs data NI=9 la cond majdep panatt alcdep xcond xmjdep xpnatt xlcdep wt ordinal fi=femdzf.dat definition_variables cond majdep panatt xcond xmjdep xpnatt wt / Begin matrices; O FU 1 6 ! store definition variable (i.e. vara) here K FU 6 2 fi ! regression coefficient T FU 1 1 fi ! threshold value V FU 1 1 ! variance (=unity) R FU 1 1 fr ! tetrachoric correlation (to be estimated) W FU 1 1 ! weight variable end matrices; SP O SP W -7 MAT V 1.00 MAT R 0.30 SP T 50 SP K FREQ W; TH -(T|T)-O*K; ! Note that we now have thresholds for both twins CO V|R_ R|V; bo r(1,1) interval r(1,1) OPT RS END
Analysis of regression of alcdep on conduct (broad), majdep, panatt ! This group is for singleton women data NI=5 la cond majdep panatt alcdep wt ordinal fi=femsing.dat definition_variables cond majdep panatt wt / Begin matrices; O FU 1 3 ! store definition variable (i.e. vara) here K FU 3 1 fr ! regression coefficient T FU 1 1 fr ! threshold value V FU 1 1 ! variance (=unity) W FU 1 1 ! weight variable end matrices; SP O SP W -4 MAT V 1.00 SP T 50 MAT T 0.1 SP K MAT K 0.05 FREQ W; TH -T-O*K; CO V; OPT func=1.E-12 OPT RS END
** Mx startup successful ** **MX-Sunos version 1.50c** The following MX script lines were read for group 1 ANALYSIS OF REGRESSION OF ALCDEP ON CONDUCT (BROAD), MAJDEP, PANATT ! estimating probit regression coefficients ! ! /data2/boulder/probitmult_withpairs.mx ! First group is MZF complete pairs DATA NI=9 NG=3 LA COND MAJDEP PANATT ALCDEP XCOND XMJDEP XPNATT XLCDEP WT ORDINAL FI=FEMMZF.DAT Ordinal data read initiated NOTE: Rectangular file contained 91 records with data that contained a total of 819 observations DEFINITION_VARIABLES COND MAJDEP PANATT XCOND XMJDEP XPNATT WT / NOTE: Definition yields 91 data vectors for analysis NOTE: Vectors contain a total of 182 observations BEGIN MATRICES; O FU 1 6 ! STORE DEFINITION VARIABLE (I.E. VARA) HERE K FU 6 2 FR ! REGRESSION COEFFICIENT T FU 1 1 FR ! THRESHOLD VALUE V FU 1 1 ! VARIANCE (=UNITY) R FU 1 1 FR ! TETRACHORIC CORRELATION (TO BE ESTIMATED) W FU 1 1 ! WEIGHT VARIABLE END MATRICES; SP O SP W -7 MAT V 1.00 MAT R 0.60 SP T 50 MAT T 0.1 SP K MAT K FREQ W; TH -(T|T)-O*K; ! NOTE THAT WE NOW HAVE THRESHOLDS FOR BOTH TWINS CO V|R_ R|V; BO T(1,1) K(1,1) K(2,1) K(3,1) BO R(1,1) INTERVAL K(1,1) K(2,1) K(3,1) T(1,1) R(1,1) OPT FUNC=1.E-12 OPT RS END
Summary of VL file data for group 1 WT XPNATT XMJDEP XCOND PANATT MAJDEP Code Number Mean Variance Minimum Maximum COND ALCDEP XLCDEP Code Number Mean Variance Minimum Maximum Summary of VL file data for group 2 WT XPNATT XMJDEP XCOND PANATT MAJDEP Code Number Mean Variance Minimum Maximum COND ALCDEP XLCDEP Code Number Mean Variance Minimum Maximum Summary of VL file data for group 3 WT PANATT MAJDEP COND ALCDEP Code E E E E E+00 Number E E E E E+01 Mean E E E E E-01 Variance E E E E E-01 Minimum E E E E E+00 Maximum E E E E E+00
MX PARAMETER ESTIMATES GROUP NUMBER: 1 Analysis of regression of alcdep on conduct (broad), majdep, panatt MATRIX K This is a FULL matrix of order 6 by MATRIX O This is a FULL matrix of order 1 by MATRIX R This is a FULL matrix of order 1 by MATRIX T This is a FULL matrix of order 1 by MATRIX V This is a FULL matrix of order 1 by MATRIX W This is a FULL matrix of order 1 by Matrix of EXPECTED thresholds ALCDEP XLCDEP Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX ALCDEP XLCDEP ALCDEP XLCDEP Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 2 Analysis of regression of alcdep on conduct (broad), majdep, panatt MATRIX K This is a FULL matrix of order 6 by MATRIX O This is a FULL matrix of order 1 by MATRIX R This is a FULL matrix of order 1 by MATRIX T This is a FULL matrix of order 1 by MATRIX V This is a FULL matrix of order 1 by MATRIX W This is a FULL matrix of order 1 by Matrix of EXPECTED thresholds ALCDEP XLCDEP Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX ALCDEP XLCDEP ALCDEP XLCDEP Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal
GROUP NUMBER: 3 Analysis of regression of alcdep on conduct (broad), majdep, panatt MATRIX K This is a FULL matrix of order 3 by MATRIX O This is a FULL matrix of order 1 by MATRIX T This is a FULL matrix of order 1 by MATRIX V This is a FULL matrix of order 1 by MATRIX W This is a FULL matrix of order 1 by Matrix of EXPECTED thresholds ALCDEP Threshold (OBSERVED MATRIX is nonexistent for raw data) EXPECTED COVARIANCE MATRIX ALCDEP ALCDEP Function value of this group: Where the fit function is -2 * Log-likelihood of raw ordinal Your model has 6 estimated parameters and 360 Observed statistics -2 times log-likelihood of data >>> Degrees of freedom >>>>>>>>>>>>>>>> Confidence intervals requested in group 1 Matrix Element Int. Estimate Lower Upper Lfail Ufail K K K T R Confidence intervals requested in group 2 Matrix Element Int. Estimate Lower Upper Lfail Ufail R This problem used 0.4% of my workspace Task Time elapsed (DD:HH:MM:SS) Reading script & data 0: 0: 0: 0.80 Execution 0: 0: 1:13.76 TOTAL 0: 0: 1:14.56 Total number of warnings issued: 11 ______________________________________________________________________________
HIGH-RISK SAMPLING SCHEMES The Ordinal data-option in MX allows us to analyze twin or family data collected under a two-stage sampling scheme, where in the first stage we study a random sample of families, but in the second stage the probability that a family will be assigned for interview is a function of phenotypic values observed at the first stage. For example, we may decide that we will do follow-up assessments with all pairs where at least one twin is affected at stage one, but only 10% of pairs where neither twin was affected at stage one.
To illustrate this, we have created a simulated data-set, with the following parameters, using multsim2_2mz.mx and multsim2_2dz.mx. WAVE 1WAVE 2 VA50% r G = 1.00 VC9% r C = 1.00 VE41% r E = 0.71 Prevalence25% First, we analyze this data assuming that all twin pairs (1000 MZ, 1000 DZ pairs) are assessed at both waves (ordinal_bivariate_simulated.mx).
SIMULATED TWO-WAVE DATA TWIN ATWIN B Wave 1Wave 2Wave 1Wave 2MZ_FULLDZ_FULL TOTAL PAIRS
Estimated parameters: WAVE 1WAVE 2 %95% CI% r VA49.7( )49.5( )r G = 1.00 VC9.3( )9.5( )r C = 1.00 VE41.1( )41.1( -- )r E = 0.71 Prevalence25.0 (t 1 =0.6748)(t 2 =0.6747)
HIGH-RISK SAMPLING SCHEMES (II) Next, we analyze the data-set that would arise under our two-stage sampling scheme, using ordinal_bivariate_hirisk.mx. This is exactly the same program as in the previous case, except that we have changed file names! In 90% of cases where neither twin was affected at stage one, the stage two phenotypic values are set to missing. What parameter estimates do we recover in this case?
Two-Wave data simulating high-risk sampling MZHIRISKDZHIRISK TOTAL PAIRS - Wave 1: Wave 2:
Estimated parameters: WAVE 1WAVE 2 %95% CI% r VA50.2( )50.3( )r G = 1.00 VC8.88.6r C = 1.00 VE r E = 0.71 Prevalence25.0 (t 1 =0.6745)(t 2 =0.6737)
HIGH-RISK SAMPLING SCHEMES (III) Notice that we included all pairs who were assessed at stage one. What happens if we focus on the stage two phenotype and include only those pairs who have data at stage two? Data are in mzlistwise.rec and dzlistwise.rec; the program is univariate_listwise.mx. Estimated parameters: WAVE 2 %95% CI VA VC VE Prevalence (t 1 =0.004) ( ) When we ignore the wave one data, our estimates of population prevalence (not unexpectedly) and genetic and environmental parameters, are seriously biased!
HIGH-RISK SAMPLING SCHEMES (IV) Suppose that instead we acknowledge that our population is drawn from a population where the prevalence of the observed trait is 25%, and fix our estimate of the threshold value, t= As in the previous example, we limit ourselves to twin pairs where wave two assessments occurred. WAVE 2 %95% CI VA VC VE The bias to parameter estimates is substantially reduced! (There is still a bias, however: in particular, our estimate of the shared environmental variance is now zero.)
HIGH-RISK SAMPLING SCHEMES (V) How do we explain these results? “Missing data theory” is an active area of research in statistics which is concerned with how we should adjust for missing observations -- which may be missing because of subject non- response, or because of sampling design (e.g. our two-stage sampling design). Missing data theory distinguishes between data that are (i)MCAR -- missing completely at random, i.e. non-response is completely unrelated to the variable we are studying (plausible for variables such as finger ridge count). (ii)MAR -- missing at random, i.e. non-response is random, but the probability of non-response may vary as a function of observed trait values (or underlying latent variables).
Suppose we have a 5-level variable with the following probabilities of missing data at subsequent follow-up: Trait ValueProbability of missing data 160% 220% 335% 413% 550% These data are certainly not MCAR, but they do meet the definition of MAR.
If probability of non-response is (i) determined by one or more correlated phenotypes that are not included in the analyses; or (ii) partly a function of the stage-two phenotype (such as would be the case if individuals who were unaffected at wave one but had become affected by the time wave two were more likely not to agree to be assessed at wave two than individuals who remained unaffected throughout), missing data will be non-ignorable. In the case where we analyzed only the wave two data, but fixed the prevalence at 25% (i.e. assuming that missingness is determined by the stage two phenotype), missingness was still strictly non- ignorable, since it was determined by wave two and not wave one phenotypic values. However, since we simulated a very high test- retest correlation between wave one and wave two data, analyzing the data as though they were MAR greatly reduced biases to estimates of genetic and environmental parameters.
HIGH-RISK SAMPLING SCHEMES (VI) Under certain conditions, missingness is said to be ignorable, i.e. we can recover estimates of the underlying population parameters without needing to adjust for differential rates of non-response. For our two-stage high-risk sampling scheme, where we assumed random sampling at the first stage, but that only 10% of concordant unaffected pairs are assessed at the second stage, the stage-two data are MAR. Provided that we use the Ordinal option in MX (or the Raw data option, for continuous variables), and analyze all pairs observed at stage one, we can recover correct estimates of population prevalence and of genetic and environmental parameters.
Missing data theory provides a framework for thinking about several important classes of problems in behavior genetics: (i)clinically ascertained samples; (ii)cooperation or retention bias; (iii)hierarchical or stage-dependent models of genetic and environmental influences on substance use initiation and outcome (e.g. smoking initiation and persisence) or risk of psychopathology.