Table 6.5, page 221 using external_pp.dta. Model A: xtreg external, i(id) mle Iteration 0: log likelihood = -1005.1321 Iteration 1: log likelihood = -1005.1265 Random-effects ML regression Number of obs…
Read More
Search Results for: stata
Applied Longitudinal Data Analysis: Modeling Change and Event Occurrenceby Judith D. Singer and John B. Willett Chapter 7: Examining the multilevel model’s error covariance structure | Stata Textbook Examples
use use https://stats.idre.ucla.edu/stat/stata/examples/alda/data/opposites_pp, clear * Table 7.2, pg. 246 * Conventional multilevel model for change: Opposite naming data, Restricted ML mixed opp c.time##c.ccog || id: time, reml cov(un) Performing EM…
Read More
Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence by Judith D. Singer and John B. Willett Chapter 8: Modeling change using covariance structure analysis | Stata Textbook Examples
use alcohol2, clear /* Table 8.1 pg 282 */ *table of sample observations with exponentiated variables preserve replace alc1 = exp(alc1) replace alc2 = exp(alc2) replace alc3 = exp(alc3) replace…
Read More
Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence by Judith D. Singer and John B. Willett Chapter 9: A Framework for Investigating Event Occurrence | Stata Textbook Examples
Figure 1.1, page 321. use https://stats.idre.ucla.edu/stat/stata/examples/alda/data/teachers, clear tabulate t censor | censor t | 0 1 | Total ———–+———————-+———- 1 | 456 0 | 456 2 | 384 0 |…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 1: Introduction to the Logistic Regression Model | Stata Textbook Examples
Table 1.1, page 3. use chdage.dta, clear (Hosmer and Lemeshow – from chapter 1) gen agrp=age recode agrp 20/29=1 30/34=2 35/39=3 40/44=4 45/49=5 50/54=6 55/59=7 60/69=8 (100 changes made) list…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 2: Multiple Logistic Regression | Stata Textbook Examples
Table 2.1, page 32. use lowbwt.dta, clear (Hosmer and Lemeshow – from appendix 1) tabulate race, gen(race_) race | Freq. Percent Cum. ————+———————————– white | 96 50.79 50.79 black |…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 3: Interpretation of the Fitted Logistic Regression Model | Stata Textbook Examples
Table 3.2, page 51. use chdage.dta, clear (Hosmer and Lemeshow – from chapter 1) gen aged=0 replace aged=1 if age >= 55 (27 real changes made) sort aged by aged:…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 4: Model-Building Strategies and Methods for Logistic Regression | Stata Textbook Examples
The data files used for the examples in this text can be downloaded in a .zip file from the Wiley Publications website. You can then use a program such as…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 5: Assessing the Fit of the Model | Stata Textbook Examples
Table 5.1, page 150. use uis.dta, clear gen ndrgfp1 = ((ndrugtx+1)/10)^(-1) gen ndrgfp2 = ndrgfp1*log((ndrugtx+1)/10) gen agendrgfp1 = age*ndrgfp1 gen racesite = race*site quietly logit dfree age ndrgfp1 ndrgfp2 ivhx2…
Read More
Applied Logistic Regression, Second Edition, by Hosmer and LemeshowChapter 6: Application of Logistic Regression with Different Sampling Models | Stata Textbook Examples
NOTE: If you want to see the design effect or the misspecification effect, use estat effects after the command. Table 6.2, page 216. NOTE: You need to increase the…
Read More
