1 parallel models. 2 model two separate processes which run in tandem bedwetting and daytime wetting...
TRANSCRIPT
1
Parallel Models
2
Parallel Models
• Model two separate processes which run in tandem
• Bedwetting and daytime wetting• 5 time points: 4½, 5½, 6½ ,7½ & 9½ yrs• Binary measures
• Fit and n-class parallel model as an n²-class model with constraints
3
4 class model – syntax pt 1
title: 4 class (un)constrained parallel model;
data: file is 'day_and_night.txt'; listwise = on;
variable: names sex bwt marr m_age parity educ tenure ne_kk ne_km ne_kp ne_kr ne_ku dw_kk dw_km dw_kp dw_kr dw_ku;
categorical = dw_kk dw_km dw_kp dw_kr dw_ku ne_kk ne_km ne_kp ne_kr ne_ku; usevariables dw_kk dw_km dw_kp dw_kr dw_ku ne_kk ne_km ne_kp ne_kr ne_ku; missing are dw_kk dw_km dw_kp dw_kr dw_ku ne_kk ne_km ne_kp ne_kr ne_ku (-9);
classes = c (4);
analysis: type = mixture; starts = 200 100 stiterations = 10; stscale = 15;
4
4 class UNconstrained model
model:
%OVERALL%
%c#1% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#3% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#4% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#2% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
5
4 class UNconstrained model
model:
%OVERALL%
%c#1% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#3% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#4% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
%c#2% [dw_kk$1]; [dw_km$1]; [dw_kp$1]; [dw_kr$1]; [dw_ku$1]; [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1];
Red text = Not necessary, but useful for comparison
6
Output for 4-class Un-Con
INPUT READING TERMINATED NORMALLY
4 class unconstrained parallel model;
SUMMARY OF ANALYSIS
Number of groups 1Number of observations 5823
Number of dependent variables 10Number of independent variables 0Number of continuous latent variables 0Number of categorical latent variables 1
Observed dependent variables
Binary and ordered categorical (ordinal) DW_KK DW_KM DW_KP DW_KR DW_KU NE_KK NE_KM NE_KP NE_KR NE_KU
Categorical latent variables C
7
Output for 4-class Un-ConTESTS OF MODEL FIT
Loglikelihood H0 Value -17302.499 H0 Scaling Correction Factor 1.067 for MLR
Information Criteria Number of Free Parameters 43 Akaike (AIC) 34690.998 Bayesian (BIC) 34977.790 Sample-Size Adjusted BIC 34841.148
Chi-Square Test of Model Fit
Pearson Chi-Square Value 2149.662 Degrees of Freedom 979 P-Value 0.0000
Likelihood Ratio Chi-Square Value 1468.348 Degrees of Freedom 979 P-Value 0.0000
8
Output for 4-class Un-Con
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSESBASED ON THE ESTIMATED MODEL
Latent classes 1 4127.12486 0.70876 2 363.58862 0.06244 3 260.72357 0.04477 4 1071.56295 0.18402
CLASSIFICATION OF INDIVIDUALS BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Class Counts and Proportions
Latent classes 1 4118 0.70720 2 346 0.05942 3 246 0.04225 4 1113 0.19114
9
Output for 4-class Un-Con
CLASSIFICATION QUALITY
Entropy 0.894
Average Latent Class Probabilities for Most Likely Latent Class Membership (Row) by Latent Class (Column)
1 2 3 4
1 0.977 0.010 0.000 0.013 2 0.079 0.870 0.020 0.031 3 0.000 0.024 0.909 0.067 4 0.070 0.014 0.027 0.890Most Likely
Latent Class Membership
Latent Class
10
Output for 4-class Un-ConRESULTS IN PROBABILITY SCALE: Latent Class 1
DW_KK Category 1 0.936 0.004 208.189 0.000 Category 2 0.064 0.004 14.265 0.000 DW_KM Category 1 0.983 0.002 401.303 0.000 Category 2 0.017 0.002 7.117 0.000 DW_KP Category 1 0.979 0.003 352.602 0.000 Category 2 0.021 0.003 7.487 0.000 DW_KR Category 1 0.986 0.002 441.507 0.000 Category 2 0.014 0.002 6.389 0.000 DW_KU Category 1 0.992 0.002 637.980 0.000 Category 2 0.008 0.002 4.928 0.000 NE_KK Category 1 0.876 0.006 135.029 0.000 Category 2 0.124 0.006 19.123 0.000 NE_KM Category 1 0.966 0.004 227.585 0.000 Category 2 0.034 0.004 8.085 0.000 NE_KP Category 1 0.978 0.003 337.963 0.000 Category 2 0.022 0.003 7.574 0.000 NE_KR Category 1 0.983 0.002 408.828 0.000 Category 2 0.017 0.002 7.155 0.000 NE_KU Category 1 0.990 0.002 521.300 0.000 Category 2 0.010 0.002 5.481 0.000
11
Figure for 4-class Un-Con
0
0.2
0.4
0.6
0.8
1
DW
_KK
DW
_KM
DW
_KP
DW
_KR
DW
_KU
NE
_KK
NE
_KM
NE
_KP
NE
_KR
NE
_KU
Class 1 (70.9%)
Class 2 (6.2%)
Class 3 (4.5%)
Class 4 (18.4%)
12
Why should we constrain this?
• Although the age at attainment of daytime continence is related to that for nighttime continence, there is considerable variability
• We might like to know– the odds of late nighttime development for a child with normal
daytime development– Whether a relapse in bedwetting is more likely if a child is late in
its daytime development
13
4 class constrained model%c#1% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#2% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
%c#3% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#4% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
14
Daywetting constraints%c#1% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#2% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
%c#3% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#4% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
15
Bedwetting constraints%c#1% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#2% [dw_kk$1] (1); [dw_km$1] (2); [dw_kp$1] (3); [dw_kr$1] (4); [dw_ku$1] (5); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
%c#3% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (11); [ne_km$1] (12); [ne_kp$1] (13); [ne_kr$1] (14); [ne_ku$1] (15);
%c#4% [dw_kk$1] (6); [dw_km$1] (7); [dw_kp$1] (8); [dw_kr$1] (9); [dw_ku$1] (10); [ne_kk$1] (16); [ne_km$1] (17); [ne_kp$1] (18); [ne_kr$1] (19); [ne_ku$1] (20);
16
Output for 4-class ConTESTS OF MODEL FIT
Loglikelihood H0 Value -17462.086 H0 Scaling Correction Factor 1.072 for MLR
Information Criteria Number of Free Parameters 23 Akaike (AIC) 34970.172 Bayesian (BIC) 35123.572 Sample-Size Adjusted BIC 35050.485
Chi-Square Test of Model Fit
Pearson Chi-Square Value 2748.584 Degrees of Freedom 1000 P-Value 0.0000
Likelihood Ratio Chi-Square Value 1797.171 Degrees of Freedom 1000 P-Value 0.0000
17
Output for 4-class Con
FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSESBASED ON THE ESTIMATED MODEL
Latent classes 1 264.25426 0.04538 2 459.37184 0.07889 3 4269.80907 0.73327 4 829.56483 0.14246
CLASSIFICATION QUALITY Entropy 0.892
CLASSIFICATION OF INDIVIDUALS BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP
Latent classes 1 287 0.04929 2 374 0.06423 3 4140 0.71097 4 1022 0.17551
18
Figure for 4-class Con
0
0.2
0.4
0.6
0.8
1
DW
_KK
DW
_KM
DW
_KP
DW
_KR
DW
_KU
NE
_KK
NE
_KM
NE
_KP
NE
_KR
NE
_KU
19
Association between classes
Class Bedwetting Daywetting%
Estimated modeln (%)
Modal assignment
3 “Normal” “Normal” 73.30% 4140 (71.1%)
4 Delayed “Normal” 14.20% 1022 (17.6%)
2 Delayed Delayed 7.90% 374 (6.4%)
1 “Normal” Delayed 4.50% 287 (4.9%)
Odds of delayed nighttime continence amongst normal daywetters
= 1022 / 4140 = 0.247
Odds of delayed nighttime continence amongst delayed daywetters = 287 / 374 = 0.767
Odds Ratio = 3.11
20
Extension to larger models
• Interest in association between 4 classes of bedwetting and 4 classes of daywetting
• Fit this with a constrained 16 class model in same way
• Should recreate the groups/curves found with separate models for BW and DW
21
Compare with 4-class Un-Con
4 class unconstrainedTESTS OF MODEL FIT
Loglikelihood
H0 Value -17302.499H0 Scaling Correction Factor 1.067 Information Criteria
Number of Free Parameters 43Akaike (AIC) 34690.998Bayesian (BIC) 34977.790Sample-Size Adjusted BIC 34841.148
Entropy 0.894
16 class constrainedTESTS OF MODEL FIT
Loglikelihood
H0 Value -16973.255H0 Scaling Correction Factor 1.098 Information Criteria
Number of Free Parameters 55Akaike (AIC) 34056.510Bayesian (BIC) 34423.336Sample-Size Adjusted BIC 34248.562
Entropy 0.815
22
Figure: 16 class constrained
0
0.2
0.4
0.6
0.8
1
DW_KK DW_KM DW_KP DW_KR DW_KU NE_KK NE_KM NE_KP NE_KR NE_KU
23
4-class Un-Con from earlier
0
0.2
0.4
0.6
0.8
1
DW
_KK
DW
_KM
DW
_KP
DW
_KR
DW
_KU
NE
_KK
NE
_KM
NE
_KP
NE
_KR
NE
_KU
Class 1 (70.9%)
Class 2 (6.2%)
Class 3 (4.5%)
Class 4 (18.4%)
24
Crosstab:DW
BW normal delayed chronic relapse
normal
4068 49 88 68
4273(95.2%) (1.1%) (2.1%) (1.6%)
(84.4%) (9.4%) (29.9%) (37.2%)
relapse
101 0 19 86
206(49.0%) (0.0%) (9.2%) (41.7%)
(2.1%) (0.0%) (6.5%) (47.0%)
delayed
374 299 37 0
710(52.7%) (42.1%) (5.2%) (0.0%)
(7.8%) (57.1%) (12.6%) (0.0%)
chronic
279 176 150 29
634(44.0%) (27.8%) (23.7%) (4.6%)
(5.8%) (33.6%) (51.0%) (15.8%)
4822 524 294 183 5823
25
Also possible with LCGAmodel: %OVERALL% i1 s1 q1 | ne_kk@0 ne_km@1 ne_kp@2 ne_kr@3 ne_ku@4; i2 s2 q2 | dw_kk@0 dw_km@1 dw_kp@2 dw_kr@3 dw_ku@4;
%c#1% [i1] (1); [s1] (2); [q1] (3); [i2] (11); [s2] (12); [q2] (13);
%c#2% [i1] (1); [s1] (2); [q1] (3); [i2] (14); [s2] (15); [q2] (16);
%c#3% [i1] (1); [s1] (2); [q1] (3); [i2] (17); [s2] (18); [q2] (19);
%c#4% [i1] (4); [s1] (5); [q1] (6); [i2] (11); [s2] (12); [q2] (13);
%c#5% [i1] (4); [s1] (5); [q1] (6); [i2] (14); [s2] (15); [q2] (16);
%c#6% [i1] (4); [s1] (5); [q1] (6); [i2] (17); [s2] (18); [q2] (19);
%c#7% [i1] (7); [s1] (8); [q1] (9); [i2] (11); [s2] (12); [q2] (13);
%c#8% [i1] (7); [s1] (8); [q1] (9); [i2] (14); [s2] (15); [q2] (16);
%c#9% [i1] (7); [s1] (8); [q1] (9); [i2] (17); [s2] (18); [q2] (19);
26
9-class constrained LCGA
0
0.2
0.4
0.6
0.8
1
DW_KK DW_KM DW_KP DW_KR DW_KU NE_KK NE_KM NE_KP NE_KR NE_KU
27
Correlations within class
• One assumption of LCA is that the latent class variable totally accounts for the observed correlations between the manifest variables (local independence)
• Not assessed by fit statistics so should be checked by examining within class residuals
• The more variables you model, particularly if they are not simply repeated measures, the more you run the risk of there being a residual bivariate correlation
28
How to examine residuals
model:
<snip>
output:
residual;
29
Residual output - univariateRESIDUAL OUTPUT
UNIVARIATE DISTRIBUTION FIT FOR CLASS 1
Variable Estimated Residual (Observed-Estimated) DW_KK Category 1 0.281 0.039 Category 2 0.719 -0.039 DW_KM Category 1 0.424 0.020 Category 2 0.576 -0.020 DW_KP Category 1 0.341 -0.022 Category 2 0.659 0.022 DW_KR Category 1 0.527 -0.060 Category 2 0.473 0.060 DW_KU Category 1 0.692 -0.041 Category 2 0.308 0.041 NE_KK Category 1 0.855 -0.028 Category 2 0.145 0.028 NE_KM Category 1 0.949 -0.028 Category 2 0.051 0.028 NE_KP Category 1 0.971 -0.025 Category 2 0.029 0.025 NE_KR Category 1 0.980 -0.001 Category 2 0.020 0.001 NE_KU Category 1 0.986 -0.013 Category 2 0.014 0.013
30
Residual output - bivariate BIVARIATE DISTRIBUTIONS FIT FOR CLASS 1
Variable Variable Estimated Residual (Observed-Estimated) DW_KK DW_KM Category 1 Category 1 0.119 0.069 Category 1 Category 2 0.162 -0.029 Category 2 Category 1 0.304 -0.049 Category 2 Category 2 0.414 0.010 DW_KK DW_KP Category 1 Category 1 0.096 -0.012 Category 1 Category 2 0.185 0.051 Category 2 Category 1 0.245 -0.010 Category 2 Category 2 0.473 -0.030 DW_KK DW_KR Category 1 Category 1 0.148 -0.014 Category 1 Category 2 0.133 0.053 Category 2 Category 1 0.378 -0.046 Category 2 Category 2 0.340 0.007 DW_KK DW_KU Category 1 Category 1 0.195 -0.005 Category 1 Category 2 0.087 0.045 Category 2 Category 1 0.497 -0.036 Category 2 Category 2 0.221 -0.003 DW_KK NE_KK Category 1 Category 1 0.241 0.040 Category 1 Category 2 0.041 0.000 Category 2 Category 1 0.615 -0.068 Category 2 Category 2 0.104 0.028
31
Tech10 BIVARIATE MODEL FIT INFORMATION Estimated Probabilities Standardized Variable Variable H1 H0 Residual (z-score) DW_KK DW_KM Category 1 Category 1 0.806 0.797 1.683 Category 1 Category 2 0.031 0.040 -3.451 Category 2 Category 1 0.103 0.112 -2.146 Category 2 Category 2 0.060 0.051 3.082 Bivariate Pearson Chi-Square 25.115 Bivariate Log-Likelihood Chi-Square 25.693 DW_KK DW_KP Category 1 Category 1 0.793 0.792 0.105 Category 1 Category 2 0.044 0.045 -0.207 Category 2 Category 1 0.103 0.104 -0.140 Category 2 Category 2 0.060 0.059 0.181 Bivariate Pearson Chi-Square 0.092 Bivariate Log-Likelihood Chi-Square 0.092 DW_KK DW_KR Category 1 Category 1 0.806 0.806 -0.035 Category 1 Category 2 0.031 0.031 0.081 Category 2 Category 1 0.120 0.120 0.043 Category 2 Category 2 0.043 0.043 -0.068 Bivariate Pearson Chi-Square 0.013 Bivariate Log-Likelihood Chi-Square 0.013
32
Compare con/un-con
4 classuncon
5 classuncon
16 classcon
25 classcon
# Parameters 43 54 55 74
DW_KK NE_KK 17.93 6.056 6.25 3.11
DW_KM NE_KM 6.01 5.82 4.49 8.08
DW_KP NE_KP 2.17 1.99 4.27 1.41
DW_KR NE_KR 4.22 3.85 0.001 0.38
DW_KU NE_KU 4.24 4.64 8.51 0.84
Overall 307.45 101.56 49.95 28.81
Bivariate Pearson Chi-Square
33
Summary
• This approach makes it possible to model two longitudinal processes in parallel
• One can examine the association between the classes obtained from two n-class models
• The more manifests you have, the less likely local independence is to hold
• One can use the n² classes as the outcome/predictor in a further (2-stage) analysis