* Program \racd\racd6p1.do August 1998 log using racd6p1.out, replace * This STATA program reads in data and gives summary statistics and Poisson and * negative binomial models for the office visits to physician data studied in * Chapter 6.3 of * A.C. Cameron and Pravin K. Trivedi (1998), * REGRESSION ANALYSIS OF COUNT DATA, * Econometric Society Monograph No.30, Cambridge University Press. * The program does only a small part of the analysis in the book. * To run you need file * racd6d1.asc * in your directory ********** DATA DESCRIPTION * * The data are extracted from the 1987-88 National Medical Expenditure Survey (NMES). * The extract and analysis are in P. Deb and P.K. Trivedi (1997), * Demand for Medical Care by the Elderly: A Finite Mixture Approach" * Journal of Applied Econometrics, 12, 313-326. * See Table 6.2 p.194 of Cameron and Trivedi (1998) for variable descriptions * 1. ofp * 2. ofnp * 3. opp * 4. opnp * 5. emr * 6. hosp * 7. exclhlth * 8. poorhlth * 9. numchron * 10. adldiff * 11. noreast * 12. midwest * 13. west * 14. age * 15. black * 16. male * 17. married * 18. school * 19. faminc * 20. employed * 21. privins * 22. medicaid ********** CREATE OUTPUT FILE * di "racd6p1.do for Cameron and Trivedi RACD chapters 6.3" ********** READ DATA * * The Physician office visits data are in ascii file racd6d1.asc * There are 4406 observations on 22 variables with one lines per obs * The data are free format separated by blanks infile ofp ofnp opp opnp emr hosp exclhlth poorhlth numchron adldiff noreast /* */ midwest west age black male married school faminc employed privins /* */ medicaid using racd6d1.asc ********** DATA TRANSFORMATIONS * ******** CHECK DATA: DESCRIPTIVE STATISTICS * describe summarize ******** SAVE DATA AS STATA DATA SET * * save racd6d1, replace ********** POISSON REGRESSION * poisson ofp exclhlth poorhlth numchron adldiff noreast midwest west age black /* */ male married school faminc employed privins medicaid nbreg ofp exclhlth poorhlth numchron adldiff noreast midwest west age black /* */ male married school faminc employed privins medicaid ********** CLOSE OUTPUT log close