Supplementary Online Materials for "Dynamic Latent Trait Models with Mixed Hidden Markov Structure for Mixed Longitudinal Outcomes" Yue Zhanga,b* and Kiros Berhanec a b c Department of Internal Medicine, University of Utah, Salt Lake City, UT Department of Family and Preventive Medicine, University of Utah, Salt Lake City, UT Department of Preventive Medicine, University of Southern California, Los Angeles, CA Correspondence to: Yue Zhang, Division of Epidemiology, Department of Internal Medicine, University of Utah, 295 Chipeta Way, Salt Lake City, UT, 84018 E-mail: zhang.yue@hsc.utah.edu Tel: 801-213-3735 Fax: 801-581-3623 1 Appendix A: Likelihood Based on the assumption of independence among outcomes, given latent variables and random effects, the observed-data likelihood for this model is πΏ(ππ , β― , ππ , ππ | β) π π = β¬ ∏ {{∑ π(πππ |πππ , πΌ1 , πΌ2 , π½, π³)π( πππ |πΌ1 , π½, π³)} ∏ π(πππ |π³, π½, π’ππ , πΊ)} π(π³|π½) π=1 π=1 πππ β π(π½)π(πΌ1 )π(πΌ2 )π(πΊ)π(π’ππ )ππ’ππ ππΊππΌ1 ππΌ2 ππ½ππ³ ππ π = π ∫ β¬ β¬ ∏ {{∑ π(ππ1π |ππ1π , πΌ1 , πΌ2 )π( ππ1π |πΌ1 ) ∏ π(ππππ |ππππ , πΌ1 , πΌ2 )π(ππππ |πππ−1 , πΌ1 )} π=1 π=2 πππ ππ π β ∏ ∏ π(ππππ |π³, π½, π’ππ , πΊ)} π(π³|π½)π(π½) π(πΌ1 )π(πΌ2 )π(πΊ)π(π’ππ )ππ’ππ ππΊππΌ1 ππΌ2 ππ½ππ³ . π=1 π=1 Appendix B: Details of MCMC Algorithm The joint posterior distribution for the parameters and latent variables in Section 3 is π(π―π , π―π , π, ππ , ππ , πΌπ , πΌπ , π, π½, πΊ, ππ , π³|ππ , β― , ππ , ππ ) ∝ π(ππ |π―π , ππ , ππ , πΌπ , πΌπ , π½, ππ )π(ππ |πΌπ )π(πΌπ )π(πΌπ )π(π―π )π(ππ )π(ππ ) × π(ππ , β― , ππ |π―π , π, π, π½, πΊ, π³)π(π³|π½, πΊ)π(π)π(π―π )π(π½)π(πΊ)π(π) π ∝ ππ π ∏ {π(ππ1π |ππ1π , πΌ1 , πΌ2 )π(ππ1π |πΌ1 , π½) ∏ π(ππππ |ππππ , πΌ1 , πΌ2 )π(ππππ |πππ−1 , πΌ1 ) π=1 π=2 2 ππ π π 2 1 (3) π ∏ ∏ π(ππππ |π―π , π, π, π½, πΊ, π³) exp (− ∑ (πΏπ1π − π£π β ππ1 − ππ β ππ1 ) 2 π=1 π=1 π=1 2 π−1 − 1 (3) (3) π π π ∑ (πΏπππ −π£π β πππ − ∑(π1πΎπ β (πΏππΎ − π£ π β πππΎ ) + π2πΎπ β π¦ππΎπ+1 )) ) 2 π=2,π π ×∏ π=1 πΎ=0 1 1 2 ′ −1 exp (− π’ π π’ ) } exp (− π― π― ) ππ π ππ |ππ |0.5 2 9 π π 2 ×∏ π=1 2 ×∏ π=1 |πΊπ | ππ /2 |ππ | −(ππ +ππ +1)/2 −π‘ππππ(πΊ π −2 )/2 π π π 2ππ ππ/2 Γππ (ππ ⁄2) 1 1 ′ 1 −π exp (− πΌ π πΌ ) exp (− β π―′ π― ) π π π |ππ |0.5 2 200 π π Each parameter or parameter vector was updated by conditioning on all other parameters via Gibbs sampling. For simplicity of development, we denote the regression parameters π―π in prevalence, transition and misclassification probability models for observed categorical outcome with misclassification by π―ππ = (ππ , πΆπ , ππ+1 ) , π―ππ = (ππ , ππ , πΆπ , π·, ππ ) and π―ππ = (ππ , ππ , πΈ, πΉ). We also denote the regression parameters π―π in modeling outcomes from the exponential family by π―ππ = (π, π»), π―ππ = (π) and π―ππ = (π, ππ , ππ ). The latent true health states for subject i are sampled directly from their full conditional distributions: π(ππ1π = π|π―ππ , π―ππ , π―ππ , πΌπ , πΌπ , ππ ) = π π(ππ1 = π|π―ππ , πΌπ )βπ(ππ2π|ππ1π = π, π―ππ , πΌπ )βπ(ππ1π |ππ1π =π,π―ππ ,πΌπ ) , π π π π |π π =β,π― ,πΌ ) ∑β=1β―π1 π(ππ1 = β|π―ππ , πΌπ )βπ(ππ2 |ππ1 = β, π―ππ , πΌπ )βπ(ππ1 ππ π π1 (A1) 3 π(ππππ = π|π―ππ , π―ππ , πΌπ , πΌπ , ππ ) = π π(πππ π π π = π|πππ−1 , π―ππ , πΌπ )βπ(πππ+1 |πππ = π, π―ππ , πΌπ )βπ(ππππ |ππππ =π,π―ππ ,πΌπ ) , for π π π π ∑β=1β―π1 π(πππ = β|πππ−1 , π―ππ , πΌπ )βπ(πππ+1 |πππ = β, π―ππ , πΌπ )βπ(ππππ |ππππ =β,π―ππ ,πΌπ ) π = 1, β― , ππ . (A2) The latent variable π³ππ for subject i at time j is sampled from full conditional distributions: π π(π³ππ |ππ , β― , ππ , ππ , π³ππ , β― , π³ππ−π , π―π , π, π, πΊ) ∝ exp {∑π=1 logππ (π¦πππ |π―ππ , π³ππ , π, π) − ∑ππ=1 (πΏπππ −π(πΏπππ ))2 2 }, (A3) The subject-level random intercept π’ππ is sample from full conditional distributions: T i π(π’ππ |ππ , β― , ππ , ππ , π³ππ , β― , π³ππ , π―π , π, π, πΊ) ∝ exp {∑π=1 logππ (π¦πππ |π―ππ , π³ππ , π, π’ππ ) − (π’ππ )2 2ππ }. (A4) The full conditional distributions of scale parameters ππ and ππ are sampled from π(ππ |πΌπ )~ππ§π― − ππ’π¬π‘ππ«π(πΊπ’ + πΌ′π πΌπ , ππ + π), (A5) and ππ ~πππ£ − πππππ(em + ∑n i=1 Ti 2 1 T i , ππ + 2 ∑ππ=1 ∑π=1 (π’ππ )2 ), π = 1,2, β― , π. (A6) The full conditional distribution of π―ππ is 2 π(π―ππ |πΌπ , ππ ) ∝ exp {∑π π₯π¨π π( ππ1π |π―ππ , πΌπ ) − 9 π―′ππ π―ππ }, (A7) The full conditional distribution of π―ππ is 2 π π(π―ππ |π―ππ , πΌπ , ππ ) ∝ exp {∑π,π=π π₯π¨π π( ππππ |π―ππ , πΌπ , πππ−1 ) − 9 π―′ππ π―ππ }, (A8) The full conditional distribution of π―ππ is 2 π(π―ππ |πΌπ , ππ , ππ ) ∝ exp {∑π,π π₯π¨π π( ππππ |π―ππ , πΌπ , ππ ) − 9 π―′ππ π―ππ }. 4 (A9) The full conditional distribution of π―ππ is 1 π(π―ππ |πΌπ , ππ ) ∝ exp {∑π,π,π logππ (π¦πππ |π―ππ , π³ππ , π, π’ππ ) − 200 π―′ππ π―ππ }. (A10) if each of ππ is normal, then this posterior distribution is normal; otherwise, a Metropolis step can be used (Hastings 1970). The full conditional distribution of π―ππ is ′ π(π―ππ |π(3) , π³) = π΅((π(3) π(3) + 1/100π°dim(π―ππ ) )−1 π(3) π°π ∑ni=1 Ti π³ , (π(3) π(3)′ + 1/100π°dim(π―ππ ) )−1 ), (A11) (π) π» where π(3) is a matrix with row vectors {ππππ ; π = 1, … , π; π = 1, … , ππ ; π = 1, … , π}, where (π) π» ππππ represents the covariate vector corresponding to π―ππ . The full conditional distribution of π―ππ is π(π―ππ |ππ―ππ , π³) = π΅((ππ―ππ π′π―ππ + 1/100π°dim(π―ππ ) )−1 ππ―ππ π°π ∑ni=1 Ti π³ , (ππ―ππ π′π―ππ + 1/100π°dim(π―ππ ) )−1 ), (A12) (π― )π» where ππ―ππ is a matrix with row vectors {ππππππ ; π = 1, … , π; π = 1, … , ππ ; π = 1, … , π}, where (π― ππππππ )π» represents the covariate vector corresponding to π―ππ . Appendix C: Validation of MCMC Algorithm A simple joint model for continuous and binary outcomes was simulated to test the ability of the MCMC based estimation algorithm to lead to valid parameter estimation in terms of bias and coverage probability. This joint modeling simulation study was conducted using a process in which 100 data sets were generated with a structure that closely followed the CHS data. In each data set, there were 400 subjects with 4 yearly follow-up. In the simulated data, three continuous 5 outcomes and one categorical outcome were generated. The categorical outcome was defined as a binary, subject to misclassification. Even though an absorbing state is defined in some applications as a special real state in which the latent process will never leave it once it enters (e.g., death), no absorbing state was assumed in this simulation in order to allow for more general settings. In the MCMC sampling process, the first 10000 iterations were discarded as a burn-in, then the next 10000 iterations were used to calculate the posterior summaries of parameters of interest with thinning rate equal to 10. The Gelman-Rubin statistic was used to check for convergence (Gelman, et al. 1992). The simulation scenario could be described as follows: Measurement model: For three observed continuous outcomes: ππππ , = π0π , + πΎπ , β πΏππ + πππ , + ππππ , , π , = 1,2,3. For an observed categorical outcome subject to misclassification: π(ππππ = 1|ππππ ) = π π exp(π1 +π2 βπ¦ππ +πΌ1π βπ1ππ +π½1π βπ¦ππ βπ1ππ ) π +πΌπ βπ1 +π½π βπ¦ π βπ1 ) 1+exp(π1 +π2 βπ¦ππ ππ ππ 1 1 ππ , where πππ , ~π(0, ππ2, ) and ππππ , ~π(0, ππ2, ). Structural model at Baseline: For the latent variable at baseline, πΏπ1 , the model is given as follows: πΏπ1 = πΌ β π2π1 + π0 β ππ1 + ππ1 . π Similarly, the model for the real latent binary variable at baseline, π¦π14 , is π(ππ1π (π) = 1) = (1) exp(π1 +πΌ1 βπ3π1 +π1 βππ1 +ππ (π) ) (1) 1+exp(π1 +πΌ1 βπ3π1 +π1 βππ1 +ππ (1) ) , where ππ11 ~π(0,1), ππ1 ~π(0,1) for identifiability and ππ ~π(0, π12 ). We further assume π0 = 1 to ensure identifiability of the model. 6 Structural model at follow-up: For the latent variable at follow-up, πΏππ , (π) π πΏππ = πΌ β π2ππ +π3 β πΏππ−1 + π4 β πππ−1 + πππ . For real latent binary variable at follow-up, ππππ , π π(ππππ = 1|πππ−1 ) (π) = (π) (π) (1) π π exp(π2 + π3 β πππ−1 + πΌ2 β π3ππ + πΌ3 β π3ππ β πππ−1 + π2 β πΏππ−1 + ππ ) (π) (π) (π) (1) π π 1 + exp(π2 + π3 β πππ−1 + πΌ2 β π3ππ + πΌ3 β π3ππ β πππ−1 + π2 β πΏππ−1 + ππ ) , (1) where πππ1 ~π(0,1) for identifiability reasons and ππ ~π(0, π12 ). The superscript (π) indicates that the variable is centered by its mean. Results from the simulation study are given in Table S.1. Average mean, median, standard deviation, nominal 95% coverage rate and bias were reported. The results showed that estimated posterior means for parameters of interest were close to the true values on average (Bias range=(0,0.44)). About half of the median estimates were above the true parameter values. In addition, coverage rates of the estimated 95% credible intervals containing the true parameter values were at least 95/100. 7 8 Appendix D: Full results from DLTM-MHMM in Southern California Children Health Study (extended from Table 4) with Information of Convergence Diagnosis, DIC and Number of Effective Sample Size. Table S.2: Full Results of DLTM-MHMM in Southern California Children Health Study mean sd 2.50% 97.50% PSRF* N.effect intercept -3.97 0.45 -4.91 -3.14 1 4000 hispanic -0.44 0.57 -1.57 0.66 1 4000 black 0.25 0.95 -1.72 1.97 1 4000 asian -0.96 1.05 -3.13 0.96 1 4000 others+mixed -0.41 0.92 -2.2 1.31 1 4000 age 0.29 0.54 -0.78 1.34 1 4000 gender -0.05 0.49 -1.01 0.9 1 4000 allergy 0.88 0.48 -0.06 1.83 1 4000 Prevalence Probability severe wheezing 1.8 0.6 0.61 2.99 1 4000 medication use 5.34 0.68 4.11 6.8 1 2200 Baseline health status effect -0.48 0.34 -1.15 0.16 1 4000 intercept -3.43 0.54 -4.52 -2.39 1 4000 hispanic 0.21 0.47 -0.78 1.07 1 4000 black -0.03 0.96 -2.2 1.59 1 4000 asian 0.34 0.69 -1.11 1.6 1 3400 others+mixed -0.87 1.1 -3.23 0.97 1 4000 age -0.9 0.39 -1.75 -0.23 1 540 gender 0.27 0.39 -0.5 1.04 1 750 allergy 1.07 0.4 0.28 1.86 1 750 Current wheezing 0.84 0.46 -0.12 1.69 1 4000 Family asthma history 0.98 0.42 0.19 1.81 1 4000 Ozone -0.03 0.02 -0.06 0.00 1 4000 Number of Sports -0.62 0.78 -2.35 0.69 1 2000 Ozone*Number of Sports Latent lung function transition effect on latent asthma Misclassification Probability 0.77 1.21 -1.99 2.82 1 4000 -0.17 0.21 -0.59 0.25 1 2300 intercept -4.37 0.42 -5.21 -3.59 1 340 Latent asthma 5.4 0.68 4.12 6.73 1 1300 age -0.02 0.22 -0.53 0.36 1 520 Current wheezing 0.96 0.46 0.07 1.9 1 2200 -0.08 0.43 -0.9 0.8 1.01 230 Transition Probability Above HS When Latent True Asthma=0 9 1.33 0.6 0.17 2.5 1.01 960 0.15 0.31 -0.43 0.8 1 4000 age 1.55 0.04 1.47 1.64 1 2300 height 28.08 1.23 25.7 30.47 1 3800 gender 0.13 0.12 -0.1 0.37 1.01 4000 NO2 -0.01 0 -0.02 0 1 4000 Latent lung function transition effect on itself Latent asthma transition effect on latent lung function Lung Function Measurements Modeling 0.87 0.02 0.83 0.92 1 4000 -0.24 0.08 -0.4 -0.08 1 2900 intercept of lnfev 7.62 0.01 7.6 7.63 1 1000 intercept of lnfef 7.21 0.01 7.19 7.23 1 4000 intercept of lnmef 7.72 0.01 7.71 7.74 1 2300 Latent lung function effect on lnfev 0.07 0 0.07 0.07 1 1400 Latent lung function effect on lnfef 0.08 0 0.08 0.09 1 2900 Latent lung function effect on lnmef 0.07 0 0.07 0.08 1 1000 Subject-level random effect in lnfev 0.06 0 0.05 0.07 1.01 4000 Subject-level random effect in lnfef 0.22 0.01 0.2 0.23 1 1900 Subject-level random effect in lnmef 0.15 0.01 0.14 0.16 1 4000 Town-level random effect in latent asthma 0.29 0.1 0.15 0.54 1 4000 Residual in lnfev 0.03 0 0.03 0.03 1 1100 Residual in lnfef 0.14 0 0.13 0.14 1 3600 Residual in lnmef 0.09 0 0.09 0.09 1 4000 When Latent True Asthma=1 interaction b/w age and True Asthma Latent Lung Function Modeling Standard Deviation (S.D.) DIC -4402.3 Brooks-Gelman PSRF 1.0 *: PSRF: potential scale reduction factor. 10 Appendix E: Prior Distribution Sensitivity Analysis Table S.3: Results of DLTM-MHMM in Southern California Children Health Study using alternative uniform prior distribution instead of normal prior distribution. Effect Estimate (95% CI) Prevalence Probability Age Allergy Severe wheezing Transition Probability Age Allergy Family Asthma History -0.89(-1.92,-0.21) 1.00(0.14,1.79) 1.04(0.18,2.00) Latent lung function transition effect on latent asthma -0.11(-0.54,0.38) 0.24(-0.81,1.29) 0.91(-0.01,1.87) 1.7(0.49,2.91) Misclassification Probability Current wheezing Above HS When Latent True Asthma=0 When Latent True Asthma=1 Latent Lung Function Modeling Age Height NO2 1.21(0.25,1.53) -0.09(-0.97,0.83) 1.28(0.11,2.48) 1.56(1.48,1.64) 28.51(26.15,30.85) Latent lung function transition effect on itself Latent asthma transition effect on latent lung function Lung Function Measurements Modeling Latent lung function effect on FEV1 Latent lung function effect on FEF75 -0.01(-0.02,0) 0.87(0.83,0.92) -0.25(-0.4,-0.09) 0.07(0.07,0.07) 0.08(0.08,0.09) 0.07(0.07,0.08) Latent lung function effect on MMEF 11 Appendix F: Posterior Predictive Checks Time 1 8.0 6.8 7.2 7.6 Observed lnFEV 7.6 7.2 Observed lnFEV 8.0 Time 2 7.2 7.4 7.6 7.8 8.0 7.2 7.6 7.8 Time 3 Time 4 Observed lnFEV 8.0 7.8 7.6 7.6 7.8 8.0 8.2 7.4 Predicted lnFEV 8.0 8.2 8.2 8.4 7.4 7.6 7.8 8.0 8.2 8.4 Predicted lnFEV 7.4 Observed lnFEV 7.4 7.4 Predicted lnFEV 8.2 7.0 7.6 7.8 8.0 Predicted lnFEV Figure S.1: QQ-plots comparing posterior predicted values to observed values for the logtransformed lung function FEV at different times of visit. 12 Observed lnFEF 7.5 7.0 6.5 6.0 6.5 7.0 7.5 8.0 6.0 7.0 7.5 8.0 Predicted lnFEF Time 3 Time 4 7.0 7.5 Observed lnFEF 8.0 Predicted lnFEF 6.5 Observed lnFEF 6.5 6.5 7.0 7.5 8.0 6.0 6.5 7.0 7.5 8.0 8.5 Observed lnFEF 6.0 6.0 6.5 7.0 7.5 8.0 8.5 Time 2 8.0 Time 1 6.5 Predicted lnFEF 7.0 7.5 8.0 8.5 Predicted lnFEF Figure S.2: QQ-plots comparing posterior predicted values to observed values for the logtransformed lung function FEF at different times of visit. 13 Time 2 7.5 7.5 8.0 7.0 7.5 8.0 Predicted lnMEF Time 3 Time 4 8.0 8.5 8.0 7.5 7.0 Observed lnMEF 8.0 7.5 7.5 7.0 Predicted lnMEF 8.5 8.5 Predicted lnMEF 7.0 Observed lnMEF 7.0 8.0 8.5 7.0 8.5 6.5 7.0 Observed lnMEF 8.0 7.5 7.0 6.5 Observed lnMEF 8.5 Time 1 7.5 8.0 8.5 Predicted lnMEF Figure S.3: QQ-plots comparing posterior predicted values to observed values for the logtransformed lung function MMEF at different times of visit. Table S.4: Comparison of predicted and observed asthma at different times of visit. Observed Asthma vs. Predicted Asthma Equal Not Equal Accuracy Time 1 637 6 99% Time 2 637 6 99% Time 3 631 12 98% Time 4 622 21 97% 14