1 Binary Models 1 A (Longitudinal) Latent Class Analysis of Bedwetting.

Slides:



Advertisements
Similar presentations
Brief introduction on Logistic Regression
Advertisements

Confirmatory factor analysis GHQ 12. From Shevlin/Adamson 2005:
Mixture modelling of continuous variables. Mixture modelling So far we have dealt with mixture modelling for a selection of binary or ordinal variables.
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Lecture 16: Logistic Regression: Goodness of Fit Information Criteria ROC analysis BMTRY 701 Biostatistical Methods II.
Lecture 6 (chapter 5) Revised on 2/22/2008. Parametric Models for Covariance Structure We consider the General Linear Model for correlated data, but assume.
Model Assessment, Selection and Averaging
1 BINARY CHOICE MODELS: LOGIT ANALYSIS The linear probability model may make the nonsense predictions that an event will occur with probability greater.
1 BINARY CHOICE MODELS: PROBIT ANALYSIS In the case of probit analysis, the sigmoid function F(Z) giving the probability is the cumulative standardized.
Models with Discrete Dependent Variables
Bayesian inference Gil McVean, Department of Statistics Monday 17 th November 2008.
Outliers Split-sample Validation
Patterson, Dayton & Graubard ASA, August 2002, NYC 1 Rejoinder.
In previous lecture, we highlighted 3 shortcomings of the LPM. The most serious one is the unboundedness problem, i.e., the LPM may make the nonsense predictions.
Lecture 23: Tues., Dec. 2 Today: Thursday:
Midterm Review Goodness of Fit and Predictive Accuracy
Outliers Split-sample Validation
Visual Recognition Tutorial
Notes on Logistic Regression STAT 4330/8330. Introduction Previously, you learned about odds ratios (OR’s). We now transition and begin discussion of.
Review for Exam 2 Some important themes from Chapters 6-9 Chap. 6. Significance Tests Chap. 7: Comparing Two Groups Chap. 8: Contingency Tables (Categorical.
BINARY CHOICE MODELS: LOGIT ANALYSIS
Decision Tree Models in Data Mining
Mixture Modeling Chongming Yang Research Support Center FHSS College.
Christopher Dougherty EC220 - Introduction to econometrics (chapter 10) Slideshow: binary choice logit models Original citation: Dougherty, C. (2012) EC220.
Categorical Data Prof. Andy Field.
Session 1 1 Check installations 2 Open Mplus 3 Type basic commands 4 Get data read in, spat out &read in again 5 Run an analysis 6 What has it done?
1 BINARY CHOICE MODELS: PROBIT ANALYSIS In the case of probit analysis, the sigmoid function is the cumulative standardized normal distribution.
Multinomial Logistic Regression Basic Relationships
CJT 765: Structural Equation Modeling Class 7: fitting a model, fit indices, comparingmodels, statistical power.
Categorical and Zero Inflated Growth Models Alan C. Acock* Summer, 2009 *Alan C. Acock, Department of Human Development and Family Sciences, Oregon State.
Social patterning in bed-sharing behaviour A longitudinal latent class analysis (LLCA)
VI. Evaluate Model Fit Basic questions that modelers must address are: How well does the model fit the data? Do changes to a model, such as reparameterization,
The Examination of Residuals. Examination of Residuals The fitting of models to data is done using an iterative approach. The first step is to fit a simple.
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
1 © 2008 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 12 The Analysis of Categorical Data and Goodness-of-Fit Tests.
Latent Growth Curve Modeling In Mplus: An Introduction and Practice Examples Part II Edward D. Barker, Ph.D. Social, Genetic, and Developmental Psychiatry.
Lecture Slide #1 Logistic Regression Analysis Estimation and Interpretation Hypothesis Tests Interpretation Reversing Logits: Probabilities –Averages.
1 Parallel Models. 2 Model two separate processes which run in tandem Bedwetting and daytime wetting 5 time points: 4½, 5½, 6½,7½ & 9½ yrs Binary measures.
1 Differential Item Functioning in Mplus Summer School Week 2.
Lecture 18 Ordinal and Polytomous Logistic Regression BMTRY 701 Biostatistical Methods II.
Chapter 11 Statistical Techniques. Data Warehouse and Data Mining Chapter 11 2 Chapter Objectives  Understand when linear regression is an appropriate.
The Impact of Missing Data on the Detection of Nonuniform Differential Item Functioning W. Holmes Finch.
Chapter 22: Building Multiple Regression Models Generalization of univariate linear regression models. One unit of data with a value of dependent variable.
N318b Winter 2002 Nursing Statistics Specific statistical tests Chi-square (  2 ) Lecture 7.
Copyright © Cengage Learning. All rights reserved. Chi-Square and F Distributions 10.
1 Binary models 2 LCGA model of frequent bedwetting + tests of gender invariance.
University Rennes 2, CRPCC, EA 1285
ALISON BOWLING MAXIMUM LIKELIHOOD. GENERAL LINEAR MODEL.
Tutorial I: Missing Value Analysis
1 Statistics 262: Intermediate Biostatistics Regression Models for longitudinal data: Mixed Models.
STATS 10x Revision CONTENT COVERED: CHAPTERS
Cross-sectional LCA Patterns of first response to cigarettes.
1 Ordinal Models. 2 Estimating gender-specific LLCA with repeated ordinal data Examining the effect of time invariant covariates on class membership The.
Jump to first page Inferring Sample Findings to the Population and Testing for Differences.
Hypothesis Testing. Statistical Inference – dealing with parameter and model uncertainty  Confidence Intervals (credible intervals)  Hypothesis Tests.
1 BINARY CHOICE MODELS: LOGIT ANALYSIS The linear probability model may make the nonsense predictions that an event will occur with probability greater.
Growth mixture modeling
LOGISTIC REGRESSION. Purpose  Logistical regression is regularly used when there are only two categories of the dependent variable and there is a mixture.
Latent Class Analysis Computing examples
Latent Class Regression
Patterns of first response to cigarettes
BINARY LOGISTIC REGRESSION
Notes on Logistic Regression
CJT 765: Structural Equation Modeling
Community &family medicine
Statistical Methods For Engineers
Categorical Data Analysis Review for Final
STAT 312 Introduction Z-Tests and Confidence Intervals for a
Problems with infinite solutions in logistic regression
Presentation transcript:

1 Binary Models 1 A (Longitudinal) Latent Class Analysis of Bedwetting

2 How much fun can you have with 5 binary variables?

3 Croudace paper:

4

5 Gender-specific prevalence and levels of missing data 4.5 years5.5 years6.5 years7.5 years9.5 years Boys (n=7217) No bedwetting Bedwetting 1793 (36.4%) 1281 (27.9%) 1061 (24.4%) 844 (20.0%) 526 (13.4%) No response Girls (n=6756) No bedwetting Bedwetting 1074 (23.2%) 691 (16.0%) 586 (14.3%) 420 (10.6%) 225 (5.9%) No response )

6 Latent Class Models Deal with patterns of response e.g = Yes at all five time points = No at all five time points = Yes early on, followed by no = Alternating pattern 11*** = Yes followed by missing 1*0*1 = etc.

7 Latent Class Models

8 Conditional independence manifest variables are independent given latent class, can be written as a product of all the probabilities for the individual items of that pattern. E.g. for a pattern ’01’, if pat(1) to be the first element of a pattern i.e. the first binary variable, then P( pattern = ’01’ | class = i) = P(pat(1) = ‘0’ | class = i)*P(pat(2) = ‘1’ | class = i)

9 Huh? Basically, Bayes’ rule plus conditional independence assumption enable you to calculate the likelihood of each pattern being assigned to each class. By selecting starting values for the probabilities, ot alternatively a starting assignment for the patterns, one can iterate to convergence to find the best solution given your chosen number of classes

10 Distribution of patterns (complete data) | N | | | 1. | | 2. | | 3. | | 4. | | 5. | | | | 6. | | 7. | | 8. | | 9. | | 10. | | | | 11. | | 12. | | 13. | | 14. | | 15. | | | | 16. | | | N | | | 17. | | 18. | | 19. | | 20. | | | | 21. | | 22. | | 23. | | 24. | | 25. | | | | 26. | | 27. | | 28. | | 29. | | 30. | | | | 31. | | 32. | |

11 Distribution of patterns with some missingness | N | | | 1. | | 2. | | 3. | | 4. | | 5. | | | | 6. | | 7. | | 8. | | 9. | | 10. | | | | 11. | | 12. | | 13. | | 14. | | 15. | | | | | N | | | 16. | | 17. | | 18. | | 19. | | 20. | | | | 21. | | 22. | | 23. | | 24. | | 25. | | | | Etc | | 183. | |

12 Thresholds Mplus thinks of binary variables as being a dichotomised continuous latent variable The point at which a continuous N(0,1) variable must be cut to create a binary variable is called a threshold A binary variable with 50% cases corresponds to a threshold of zero A binary variable with 2.5% cases corresponds to a threshold of 1.96

13 Thresholds Figure from Uebersax webpage

14 Categorical variables A categorical variable with n-levels requires n-1 thresholds i.e. you need to make n-1 cuts in a continuous N(0,1) variable to make your observed n-level variable

15 Degrees of freedom 32 possible patterns (missing data patterns don’t count) Each additional class requires –5 df to estimate the 5 prevalence of wetting within that class (i.e. 5 thresholds) –1 df for an additional cut of the latent variable defining the class distribution Hence a 5-class model uses up 5*5 + 4 = 29 degrees of freedom leaving 3 df to test the model

16 Procedure Fit 1-5 class models in turn Output = within class thresholds (prevalences) and latent class distribution Select preferred model using various criteria –Statistical – measures of fit –Ease of interpretation of results –Parsimony –Face validity –Astrology Celebrate

17 How to fit in Mplus – black box way data: file is ‘bedwetting_5tp.txt'; listwise is on; variable: names sex bwt marr m_age parity educ tenure ne_kk ne_km ne_kp ne_kr ne_ku; categorical = ne_kk ne_km ne_kp ne_kr ne_ku; usevariables ne_kk ne_km ne_kp ne_kr ne_ku; missing are ne_kk ne_km ne_kp ne_kr ne_ku (-9); classes = c (4); analysis: type = mixture; starts = ; stiterations = 10; stscale = 20; model: %OVERALL% Is that it????

18 What you’re actually doing: model: %OVERALL% [c#1 c#2 c#3]; %c#1% [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1]; %c#2% [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1]; %c#3% [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1]; %c#4% [ne_kk$1]; [ne_km$1]; [ne_kp$1]; [ne_kr$1]; [ne_ku$1]; 4 class model => 3 estimated threshold for latent class variable 5 more thresholds for each class

19 How many random starts? Depends on –Sample size –Complexity of model Number of manifest variables Number of classes Aim to find consistently the model with the lowest likelihood, within each run

20 Success Not there yet Loglikelihood values at local maxima, seeds, and initial stage start numbers: Loglikelihood values at local maxima, seeds, and initial stage start numbers

21 What the output looks like TESTS OF MODEL FIT Loglikelihood H0 Value H0 Scaling Correction Factor for MLR Information Criteria Number of Free Parameters 23 Akaike (AIC) Bayesian (BIC) Sample-Size Adjusted BIC (n* = (n + 2) / 24) Chi-Square Test of Model Fit for the Binary outcomes Pearson Chi-Square Degrees of Freedom 8 P-Value Likelihood Ratio Chi-Square Degrees of Freedom 8 P-Value

22 Measures of entropy Average Latent Class Probabilities for Most Likely Latent Class Membership (Row) by Latent Class (Column) Entropy (global) 0.844

23 Model based + modal class latent class distribution FINAL CLASS COUNTS AND PROPORTIONS FOR THE LATENT CLASSES BASED ON THE ESTIMATED MODEL Latent classes CLASSIFICATION OF INDIVIDUALS BASED ON THEIR MOST LIKELY LATENT CLASS MEMBERSHIP Class Counts and Proportions Latent classes

24 Model results Estimates S.E. Est./S.E. Latent Class 1 Thresholds NE_KK$ NE_KM$ NE_KP$ NE_KR$ NE_KU$ Latent Class 2 Thresholds NE_KK$ NE_KM$ NE_KP$ NE_KR$ NE_KU$ Estimates S.E. Est./S.E. Latent Class 3 Thresholds NE_KK$ NE_KM$ NE_KP$ NE_KR$ NE_KU$ Latent Class 4 Thresholds NE_KK$ NE_KM$ NE_KP$ NE_KR$ NE_KU$ Categorical Latent Variables Means C# C# C#

25 RESULTS IN PROBABILITY SCALE Latent Class 1 NE_KK Category Category NE_KM Category Category NE_KP Category Category NE_KR Category Category NE_KU Category Category Latent Class 2 NE_KK Category Category NE_KM Category Category NE_KP Category Category NE_KR Category Category NE_KU Category Category

26 These can be plotted In Excel from the probabilities:

27 … or in Mplus plot: type is plot2; series is anybw_t1 (4.5) anybw_t2 (5.5) anybw_t3 (6.5) anybw_t4 (7.5) anybw_t5 (9.5); Then Graph> view graphs> estimated probabilities

28 Yuck!

29 Model fit stats 1 class2 class3 class4 class5 class Estimated params Likelihood BLRT < BIC Entropy

30 Model fit stats - BIC Bayesian Information Criterion = -2*Log-likelihood + (# params)*ln(sample size) Function of likelihood which rewards a more parsimonius model Decrease followed by an increase as extra classes are added

31 Model fit stats - Entropy Measure of the certainty with which patterns (and therefore subjects) are assigned to latent classes. Higher values indicate a greater delineation of classes – ideally approaching 1 (Celeux & Soromenho) 0.62 would indicate 'fuzzyness' (Ramaswamy) Thorough job: –Examine global entropy, –Examine class-specific entropy –Examine the assignment probabilities for each individual pattern

32 Model fit stats - BLRT Bootstrap Likelihood Ratio Test Traditional Δ-likelihood test cannot be used to test nested latent class models as the difference in likelihoods is not chi-square distributed The BLRT empirically estimates the difference distribution providing a p-value for the observed difference which can be used in tests of model fit

33 How to obtain BLRT Fit k-class model Select an optseed which replicates the solution with the lowest likelihood for k-classes Re-fit k-class model using optseed, specifying tech14 in the output section and selecting an appropriate number of runs for bootstrapping k-1starts = ; lrtstarts ; lrtbootstrap 100; Ensure that optimal k-1 class model has been replicated

34 BLRT Output PARAMETRIC BOOTSTRAPPED LIKELIHOOD RATIO TEST FOR 4 (H0) VERSUS 5 CLASSES H0 Loglikelihood Value Times the Loglikelihood Difference Difference in the Number of Parameters 7 Approximate P-Value Successful Bootstrap Draws 100 Does this agree with what you obtained for 4 class run? B LRT p-value implies no improvement in fit when moving from 4 to 5 classes

35 Model fit stats 1 class2 class3 class4 class5 class Estimated params Likelihood BLRT < BIC Entropy BLRT 4 class model is adequate fit to data and there is little improvement in fit when a 5 th class is added BIC attains it’s minimum value at the 4 class model (penalising 5-class for it’s lack of parsimony) Entropy 2-class model has highest entropy, however all values are reasonably high

36 Other considerations - interpretation 4 class model 5 class model

37 Final decision 4 and 5 class model fit the data, parsimony favours 4 class Both 4 and 5 class models make intuitive sense –4 classes: ‘normative’, ‘delayed’, ‘persistent’, ‘relapse’ –5 class brings us ‘severe delay’ 5 class model is in good agreement with Croudace et al (2004) Job’s a good ‘un

38 Conclusions Like EFA, LCA is an exploratory tool with the aim of summarising the variability in the dataset in a simple/interpretable way These results do not prove that there are 4 or 5 groups of children in mere life. LCA will find groupings in the data even if there is no reason to think such groups might exist.

39 Bring on the covariates

40 Predicting class membership One can strengthen the assertion that subjects can be neatly packaged in little groups if one can show that these groups differ with respect to –Co-morbid conditions –Aetiogical factors –Later outcomes Even better if such findings support what is seen in (a) other epidemiological studies, (b) clinical settings

41 Output from LCA: Class distribution Set of probabilities defining the likelihood that each observed pattern can be assigned to each class PatternNormativeDelayedSev delayPersistRelapse

42 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)

43 Save data from Mplus savedata: file is “boys_5class_output_completecase.txt"; save cprob; Don’t forget to add the ID variable: variable: idvariable is ID;

44 Dataset: t1t2t3t4t5IDp(c1)p(c2)p(c3)p(c4)p(c5) Modal class

45 Then what? Merge Mplus output with covariates using ID Mplus will only permit one ID variable. –ALSPAC has one ID to identify parents but two ID’s to identify the kids – parent ID plus another one –Create a composite ID e.g , and then rederive proper ID before matching Read into Stata (or similar)

46 Reshaping the dataset Weighted model requires a reshaping of the dataset so that each child has n-rows (for an n- class model) rather than just 1

47 Pre-shaped – first 20 kids | ID sex dev_18 dev_42 pclass1 pclass2 pclass3 pclass4 pclass5 modclass | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male |

48 Pre-shaped – first 20 kids | ID sex dev_18 dev_42 pclass1 pclass2 pclass3 pclass4 pclass5 modclass | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male | | | | male | | male | | male | | male | | male | covariatesPosterior probs Modal class

49 The reshaping reshape long pclass, i(id) j(class) (note: j = ) Data wide -> long Number of obs > Number of variables 66 -> 63 j variable (5 values) -> class xij variables: pclass1 pclass2... pclass5 -> pclass

50 Re-shaped – first 3 kids | id sex dev_18 dev_42 pclass class | | | 1. | male | 2. | male | 3. | male | 4. | male | 5. | male | | | 6. | male | 7. | male | 8. | male | 9. | male | 10. | male | | | 11. | male | 12. | male | 13. | male | 14. | male | 15. | male | First kid Third kid Second kid

51 Multinomial model log using "temperament.log", replace foreach var of varlist activity rhythmicity approach /// adaptability intensity mood persistence distractibility /// threshold { xi: mlogit class `var' [iw = pclass], rrr test `var' xi: mlogit class `var' kz021 [iw = pclass], rrr test `var' xi: mlogit class `var' kz021 b1 b2 b5 b6 b10 b16 b17 i.wisc_70 [iw = pclass], rrr } log close

52 Multinomial model log using "temperament.log", replace foreach var of varlist activity rhythmicity approach /// adaptability intensity mood persistence distractibility /// threshold { xi: mlogit class `var' [iw = pclass], rrr test `var' xi: mlogit class `var' kz021 [iw = pclass], rrr test `var' xi: mlogit class `var' kz021 b1 b2 b5 b6 b10 b16 b17 i.wisc_70 [iw = pclass], rrr } log close Weight by class membership probabilities

53 Typical Output Multinomial logistic regression Number of obs = 9535 LR chi2(4) = Prob > chi2 = Log likelihood = Pseudo R2 = class | RRR Std. Err. z P>|z| [95% Conf. Interval] | adaptability | | adaptability | | adaptability | | adaptability | (class==4 is the base outcome) ( 1) [1]adaptability = 0 ( 2) [2]adaptability = 0 ( 3) [3]adaptability = 0 ( 4) [5]adaptability = 0 chi2( 4) = Prob > chi2 =

54 Summary Can use Latent Class Analysis to summarise the variability in patterns of response to binary longitudinal repeated measures ~ LLCA [Longitudinal LCA] Can use time invariant covariates to predict class membership in a 2-stage model in Stata using posterior probabilities