Transcription of ADVANCED STATISTICAL METHODS: PART 1: …
1 ACS Outcomes Research Course ADVANCED STATISTICAL methods 1 ADVANCED STATISTICAL methods : part 1: INTRODUCTION TO PROPENSITY SCORES IN STATA Learning objectives: To understand the use of propensity scores as a means for controlling for selection bias in observational studies of treatment effects. To learn how to create propensity scores apply them in a variety of analytic approaches in STATA. To use propensity scores to evaluate the outcomes of open versus laparoscopic appendectomy in the NSQIP data provided. PROPENSITY SCORES IN STATA: Open the dataset and describe the data For this analysis, we will use NSQIP data for patients undergoing appendectomy (2005-2007). This dataset contains 21,475 observations (patients) and 86 variables. The first group (2-56) includes pre-operative patient characteristics and medical conditions.
2 The second group (57-83) includes peri-operative outcomes. The variables morbprob (var #84) and mortprob (var #85) are probabilities of morbidity and mortality, respectively, based on the NSQIP risk models. Finally, the variable treatment (var #86) tells you whether the appendectomy was performed open or laparoscopically. Type the command: describe, number STATA output: Contains data from D:\nbirkmey\Desktop\Desktop\ACS Course 2010\Mark Propensity\Appendicitis_Propensity\ obs: 21,475 vars: 90 27 Oct 2010 13:11 size: 4,123,200 ( of memory free) ---------------------------------------- ---------------------------------------- --------- variable storage display value name type format label variable label ---------------------------------------- ---------------------------------------- --------- 1.
3 Caseid long % Patient ID 2. sex byte % sex Patient Sex 3. race str32 %32s Patient Race 4. race1 byte % race==American Indian or Alaska Native 5. race2 byte % race==Asian or Pacific Islander 6. race3 byte % race==Black, Not of Hispanic Origin 7. race4 byte % race==Hispanic, Black 8. race5 byte % race==Hispanic, Color Unknown 9. race6 byte % race==Hispanic, White 10. race7 byte % race==Unknown 11. race8 byte % race==White, Not of Hispanic Origin 12. white byte % whitelab White/Non-White Race 13. white1 byte % white==White 14.
4 White2 byte % white==Non-white 15. white3 byte % white==Unknown 16. prncptx str25 %25s Principal CPT ACS Outcomes Research Course ADVANCED STATISTICAL methods 2 17. cpt str5 %5s CPT code 18. inout byte % inout Inpatient/Outpatient Status 19. age byte % Patient Age 20. operyr int % Year of Operation 21. height byte % Patient Height 22. weight int % Patient Weight 23. bmi float % BMI 24. bmi40 float % Morbid Obesity 25. bmicat byte % 4 quantiles of bmi 26. diabetes byte % diabetes DM/oral or insulin 27. diabet~1 byte % diabetes==No 28.
5 Diabet~2 byte % diabetes==Oral Med 29. diabet~3 byte % diabetes==Insulin 30. smoke byte % yesno Current (Within 1 YR) Smoker 31. etoh byte % yesno Current (Within 2 Weeks) Drinker (>2 per Day) 32. dyspnea byte % dyspnea Dyspnea 33. dyspnea1 byte % dyspnea==No 34. dyspnea2 byte % dyspnea==Moderate Exertion 35. dyspnea3 byte % dyspnea==At Rest 36. dnr byte % yesno DNR Status 37. fnsta~s2 byte % fnstatus2 Functional Status Prior to Surgery 38. fnsta~21 byte % fnstatus2==Independent 39. fnsta~22 byte % fnstatus2==Partially Dependent 40. fnsta~23 byte % fnstatus2==Totally Dependent 41.
6 Hxcopd byte % yesno History of Severe COPD 42. ascites byte % yesno Ascites 43. hxchf byte % yesno CHF within 30 days 44. hxmi byte % yesno MI within 6 mths 45. hypermed byte % yesno HTN requiring medication 46. dialysis byte % yesno On dialysis pre-op 47. pregna~y byte % yesno Pregnant at time of surgery 48. rupture byte % Rupture 49. emergncy byte % yesno Emergency Case 50. asa byte % asa ASA Class 51. asa1 byte % asaclas==1-No Disturb 52. asa2 byte % asaclas==2-Mild Disturb 53. asa3 byte % asaclas==3-Severe Disturb 54. asa4 byte % asaclas==4-Life Threat 55.
7 Asa5 byte % asaclas==5-Moribund 56. asa6 byte % asaclas==NULL 57. tothlos int % LOS 58. supinfec byte % yesno Superficial surgical site infection 59. wndinfd byte % yesno Deep Incisional SSI 60. orgspc~i byte % yesno Organ Space SSI 61. dehis byte % yesno Wound Disruption 62. oupneumo byte % yesno Pneumonia 63. reintub byte % yesno Unplanned Reintubation 64. pulembol byte % yesno PE 65. failwean byte % yesno Ventilator>48 Hours 66. renainsf byte % yesno Progressive Renal Insufficiency 67. oprenafl byte % yesno Acute Renal Failure 68. urninfec byte % yesno UTI 69.
8 Cnscva byte % yesno Stroke/CVA 70. cnscoma byte % yesno Coma>24 Hours 71. neurodef byte % yesno Peripheral Nerve Injury 72. cdarrest byte % yesno Cardiac Arrest req CPR 73. cdmi byte % yesno MI 74. othbleed byte % yesno Bleeding req. >4 units 75. othdvt byte % yesno DVT 76. othsysep byte % yesno Sepsis 77. othses~k byte % yesno Septic Shock 78. convert byte % yesno Convert Lap to Open 79. return byte % yesno Return to OR 80. died byte % diedlab Peri-op Death 81. anycomp float % Any Complication 82. mincomp float % Minor Complication ACS Outcomes Research Course ADVANCED STATISTICAL methods 3 83.
9 Majcomp float % Major Complication 84. morbprob float % Morbidity Risk 85. mortprob float % Mortality Risk 86. treatment byte % treatment Open/Lap Treatment ---------------------------------------- ---------------------------------------- -------------------Sorted by: r Exploring the relationship between patient pre-operative characteristics and conditions and treatment We will first explore the relationship between patient pre-operative characteristics and treatment with either open or laparoscopic appendectomy in this dataset. Begin by tabulating the treatment var iable. Type the command: tab treatment STATA output: . tab treatment Open/Lap | Treatment | Freq. Percent Cum. ------------+--------------------------- -------- Lap Appy | 15,657 Open Appy | 5,818 ------------+--------------------------- -------- Total | 21,475 This output shows that 5,818 (27%) of patients had open appendectomy and 15,657 (5,818) patients had laparoscopic appendectomy.
10 To determine what variables are associated with treatment you could do crosstabs for each covariate. For example, here is the crosstab for treatment and sex: Type the command: tab treatment sex, row chi nokey STATA output: . tab treatment sex, row chi nokey Open/Lap | Patient Sex Treatment | Female Male | Total -----------+----------------------+----- ----- Lap Appy | 7,541 8,116 | 15,657 | | -----------+----------------------+----- ----- Open Appy | 2,468 3,350 | 5,818 | | -----------+----------------------+----- ----- Total | 10,009 11,466 | 21,475 | | Pearson chi2(1) = Pr = ACS Outcomes Research Course ADVANCED STATISTICAL methods 4 Alternatively, you could fit a full model (include all covariates) or fit a stepwise model to obtain a more parsimonious model.