1 Ordinal Models
2 Estimating gender-specific LLCA with repeated ordinal data Examining the effect of time invariant covariates on class membership The effect of class membership on a later outcome
3 The data 5 repeated measures of bedwetting 4½, 5½, 6½,7½ & 9½ yrs 3-level ordinal –Dry –Infrequent wetting (< 2 nights/week) –Frequent wetting (2+ nights/week)
4 4 time point ordinal LLCA (Boys) title: 4 time point LLCA of ordinal bedwetting; data: file is 'C:\Work\bedwet_dsm4_llca\spss\llca_dsm4.txt'; listwise is ON; variable: names ID sex nwet_kk2 nwet_kk3 nwet_kk4 nwet_kk5 nwet_km2 nwet_km3 nwet_km4 nwet_km5 nwet_kp2 nwet_kp3 nwet_kp4 nwet_kp5 nwet_kr2 nwet_kr3 nwet_kr4 nwet_kr5 nwet_ku2 nwet_ku3 nwet_ku4 nwet_ku5; categorical = nwet_kk3 nwet_km3 nwet_kp3 nwet_kr3 nwet_ku3; usevariables nwet_kk3 nwet_km3 nwet_kp3 nwet_kr3 nwet_ku3; missing are nwet_kk3 nwet_km3 nwet_kp3 nwet_kr3 nwet_ku3 (999); classes = c (4); useobservations (sex==1);
5 RESULTS IN PROBABILITY SCALE Latent Class 1 NWET_KK3 Category Category Category NWET_KM3 Category Category Category NWET_KP3 Category Category Category NWET_KR3 Category Category Category NWET_KU3 Category Category Category
6 RESULTS IN PROBABILITY SCALE Latent Class 1 NWET_KK3 Category Category Category NWET_KM3 Category Category Category NWET_KP3 Category Category Category NWET_KR3 Category Category Category NWET_KU3 Category Category Category Dry Infrequent wetting Frequent wetting
7 Alternative 1 – three dimensions A 3D plot… or something made out of plasticine
8 Alternative 2 – two figures Infrequent bedwettingFrequent bedwetting
9 Alternative 3 – two figures Any bedwettingFrequent bedwetting
10 Alternative 3 – two figures Any bedwettingFrequent bedwetting (1) A persistent wetting group who mostly wet to a frequent level (2) A persistent wetting group who mostly wet to an infrequent level (3) A delayed group comprising mainly infrequent wetters (4) Normative group
11 Fit statistics - Boys BoysGirls # class# parmsBICBLRTEntropyBICBLRTEntropy < < <
12 5-class model (boys) Any bedwettingFrequent bedwetting
13 5-class model (boys) Normative (63.8%) –Mild risk of infrequent wetting at start which soon disappears Delayed-infrequent (18.2%) –Delayed attainment of nighttime bladder control but rarely attains frequent levels Persistent-infrequent (11.4%) –Persistent throughout period but rarely attains frequent levels Persistent-frequent (4.0%) –Persistently and frequently until late into period. Appears to be turning into lower frequency wetting however over 80% are still wetting to some degree at 9.5yr Delayed-frequent (2.7%) –Frequent wetting until half-way through time period, reducing to a lower level of wetting which appears to be clearing up by 9.5yr
14 Fit statistics – Girls – Oh! BoysGirls # class# parmsBICBLRTEntropyBICBLRTEntropy < < <
15 Fit statistics – Girls – Oh! BoysGirls # class# parmsBICBLRTEntropyBICBLRTEntropy < < <
16 6-class model (girls) Any bedwettingFrequent bedwetting
17 6-class model (girls) Normative (78.6%) Delayed-infrequent (11.7%) Persistent-infrequent (4.6%) Persistent-frequent (1.6%) Delayed-frequent (1.3%) Relapse (2.0%) –Initial period of dryness followed by a return to infrequent wetting
18 Incorporating covariates 2-stage method Export class probabilities to another package – Stata Model class membership as a multinomial model with probability weighting Using classes derived from repeated BW measures with partially missing data (gloss over)
19 Multinomial models (boys) label values class class_label label define class_label /// 1 "Pers INF [1]" /// 2 "DelayFRQ [2]" /// 3 "Normal [3]" /// 4 "Pers FRQ [4]" /// 5 "DelayINF [5]", add tab class foreach var of varlist bedwet_m bedwet_p […] toilet { tab `var' if class==1 xi: mlogit class `var' [iw = boy_weights], rrr test `var' }
20 Typical output Multinomial logistic regression Number of obs = 5004 LR chi2(4) = Prob > chi2 = Log likelihood = Pseudo R2 = class | RRR Std. Err. z P>|z| [95% Conf. Interval] Pers INF [1] | bedwet_m | DelayFRQ [2] | bedwet_m | Pers FRQ [4] | bedwet_m | DelayINF [5] | bedwet_m | (class==Normal [3] is the base outcome) ( 1) [Pers INF [1]]bedwet_m = 0 ( 2) [DelayDSM [2]]bedwet_m = 0 ( 3) [Pers DSM [4]]bedwet_m = 0 ( 4) [DelayINF [5]]bedwet_m = 0 chi2( 4) = 91.87, Prob > chi2 =
21 Selection of covariates (boys) MeasureDelay INFPers INFDelay DSMPers DSMChi, p Mum history of BW 1.54 [1.19, 2.00] 2.46 [1.86, 3.24] 3.02 [1.92, 4.74] 3.8 [2.67, 5.39] 91.9, < Dad history of BW 1.32 [0.97, 1.79] 1.48 [1.04, 2.12] 2.14 [1.21, 3.78] 2.34 [1.47, 3.73] 20.7, < Development at 18mn 1.06 [0.99, 1.13] 1.05 [0.96, 1.14] 1.27 [1.08, 1.48] 1.21 [1.07, 1.37] 17.9, Development at 42mn 1.07 [0.99, 1.15] 1.17 [1.07, 1.28] 1.16 [0.98, 1.37] 1.27 [1.11, 1.46] 23.3, < Birthweight 1 [0.93, 1.07] 0.99 [0.91, 1.08] 0.97 [0.84, 1.13] 0.98 [0.87, 1.11] 0.22, Gestational age 1.01 [0.94, 1.09] 0.98 [0.89, 1.07] 0.89 [0.75, 1.05] 0.93 [0.81, 1.06] 3.52, Maternal age 1.11 [1.02, 1.21] 1.1 [0.99, 1.23] 1.23 [1.00, 1.51] 1.02 [0.87, 1.19] 10.0, Maternal education 1.1 [1.04, 1.16] 1.11 [1.04, 1.19] 1.12 [0.99, 1.27] 0.99 [0.90, 1.09] 21.4, < 0.001
22 What if we had used modal-class? The further the posterior probabilities for class assignment are from 1 (i.e. the lower the entropy) the poorer the estimates from a model using the modal class In this example (partial missing data) –entropy =
23 Estimates using mod class Delay INFPers INFDelay FRQPers FRQChi, p Weighted model Mum history of BW 1.54 [1.19, 2.00] 2.46 [1.86, 3.24] 3.02 [1.92, 4.74] 3.8 [2.67, 5.39] 91.9, < Dad history of BW 1.32 [0.97, 1.79] 1.48 [1.04, 2.12] 2.14 [1.21, 3.78] 2.34 [1.47, 3.73] 20.7, < Modal class Mum history of BW 1.78 [1.37, 2.32] 2.72 [2.06, 3.59] 2.63 [1.60, 4.32] 4.06 [2.91, 5.68] 104.6, < Dad history of BW 1.32 [0.96, 1.80] 1.51 [1.05, 2.16] 2.11 [1.17, 3.80] 2.30 [1.46, 3.62] 20.6, < Bias depends on class and also covariate
24 A later outcome Boys’ data Outcomes: –Key Stage 3 at yrs –Achieved level 5 or greater in English/Sci/Maths English failed = 1210 (27.9%) Science failed = 895 (20.6%) Maths failed = 845 (19.5%)
25 2 stage procedure - Stata label values class class_label label define class_label /// 1 "Pers INF [1]" /// 2 "DelayFRQ [2]" /// 3 "Normal [3]" /// 4 "Pers FRQ [4]" /// 5 "DelayINF [5]", add recode class 3=0 foreach var of varlist maths science english { tab `var' if class==1 xi: logit `var' i.class [iw = b_par_p], or test _Iclass_2 _Iclass_3 _Iclass_4 _Iclass_5 }
26 KS3 - English Logistic regression Number of obs = 4341 LR chi2(4) = 7.73 Prob > chi2 = Log likelihood = Pseudo R2 = k3_lev5e | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] Pers INF | Delay FRQ | Pers FRQ | Delay INF | ( 1) _Iclass_1 = 0 ( 2) _Iclass_2 = 0 ( 3) _Iclass_4 = 0 ( 4) _Iclass_5 = 0 chi2( 4) = 7.97 Prob > chi2 =
27 KS3 - Maths Logistic regression Number of obs = 4341 LR chi2(4) = Prob > chi2 = Log likelihood = Pseudo R2 = k3_lev5m | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] Pers INF | Delay FRQ | Pers FRQ | Delay INF | ( 1) _Iclass_1 = 0 ( 2) _Iclass_2 = 0 ( 3) _Iclass_4 = 0 ( 4) _Iclass_5 = 0 chi2( 4) = Prob > chi2 =
28 KS3 - Science Logistic regression Number of obs = 4341 LR chi2(4) = 8.94 Prob > chi2 = Log likelihood = Pseudo R2 = k3_lev5s | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval] Pers INF | Delay FRQ | Pers FRQ | Delay INF | ( 1) _Iclass_1 = 0 ( 2) _Iclass_2 = 0 ( 3) _Iclass_4 = 0 ( 4) _Iclass_5 = 0 chi2( 4) = 9.34 Prob > chi2 =
29 Summary Fitting ordinal models is similar to binary data however results (“trajectories”) are harder to interpret graphically Resulting classes can be used either as outcomes or categorical predictors using weighted regression in Stata Using variables derived from modal class assignment can often introduce very biased estimates