* STATA Program \racd\racd3p4.do February 2001 log using racd3p4.out, replace * This STATA program reads in data and gives summary statistics and Poisson and * negative binomial models for the doctor visits studied in * Chapter 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. * At this stage it gives Table 3.2 and the first two columns of Table 3.3 * The book instead used Limdep and a fuller Limdep program is available * To run you need file * racd3.asc * in your directory ********** DATA DESCRIPTION * * The data set racd3.asc is the same data as originally used in * (1) A.C. Cameron and P.K. Trivedi (1986), "Econometric Models Based on * Count Data: Comparisons and Applications of Some Estimators and Tests", * Journal of Applied Econometrics, Vol. 1, pp. 29-54. * and in Table 4 * (2) A.C. Cameron, P.K. Trivedi, F. Milne and J. Piggott (1988), * "A Microeconometric Model of the Demand for Health Care and Health * Insurance in Australia", Review of Economic Studies, Vol.55, pp. 85-106. * though in places this paper used more variables than those here * and in * (3) A.C. Cameron, P.K. Trivedi (1993), * "Tests of Independence in Parametric Models with Applications and * Illustrations", Journal of Business & Economics Statistics, * Vol.11, pp.29-43. * and in a number of other subsequent papers. * This data is not a representative sample of Australians as it oversamples * young and old. In particular, use of health services may be overstated. * This is because while the original sample of 40,650 individuals * from the 1977-78 Australian Health Survey is representative, * the sample used here is restricted to single people over 18 years of age. * See the R.E.Stud. (1988, pp.85-106) section 3 for more detailed * discussion of the data than that given in the RACD book. * The regressors are defined in RACD on page 68 * Socioeconomic: * SEX 1 if female, 0 if male * AGE Age in years divided by 100 * (measured as mid-point of 10 age groups from 15-19 years to * 65-69 with 70 or more coded treated as 72) * AGESQ AGE squared * INCOME Annual income in Australian dollars divided by 1000 * (measured as mid-point of coded ranges Nil, <200, 200-1000, * 1001-, 2001-, 3001-, 4001-, 5001-, 6001-, 7001-, 8001-10000, * 10001-12000, 12001-14000, with 14001- treated as 15000 * Health insurance: * LEVYPLUS 1 if covered by private health insurance fund for private * patient in public hospital (with doctor of choice), 0 otherwis * FREEPOOR 1 if covered by government because low income, recent immigran * unemployed, 0 otherwise * FREEREPA 1 if covered free by government because of old-age or disabili * pension, or because invalid veteran or family of deceased * veteran, 0 otherwise * (Omitted category LEVY is 1 if covered by Medibank health insurance) * Health status: * ILLNESS Number of illnesses in past 2 weeks with 5 or more coded as 5 * ACTDAYS Number of days of reduced activity in past two weeks due to * illness or injury * HSCORE General health questionnaire score using Goldberg's method. * High score indicates bad health. * CHCOND1 1 if chronic condition(s) but not limited in activity, 0 other * CHCOND2 1 if chronic condition(s) and limited in activity, 0 otherwise * Note that the R.E.Stud. (1988) article uses different names: * FREEREPA was called FREEOTHER * HSCORE was called GHQ * CHCOND1 was called LIMCHRON * CHCOND2 was called NONLIMCHRON * The count variables are defined in R.E.Stud. (1988, pp.91) * DVISITS Number of consultations with a doctor or specialist * in the past 2 weeks * (same as DOCTORCON in R.E.Stud. (1988) * and NOCNSLT in J.A.E.(1986)) * NONDOCCO Number of consultations with non-doctor health professionals * (chemist, optician, physiotherapist, social worker, * district community nurse, chiropodist or chiropractor) * in the past 2 weeks * HOSPADMI Number of admissions to a hospital, psychiatric hospital, * nursing or convalescent home in the past 12 months * (up to 5 or more admissions which is coded as 5) * HOSPDAYS Number of nights in a hospital, etc. during most recent * admission: taken, where appropriate, as the mid-point of the * intervals 1, 2, 3, 4, 5, 6, 7, 8-14, 15-30, 31-60, 61-79 * with 80 or more admissions coded as 80. If no admission * in past 12 months then equals zero. * MEDICINE Total number of prescribed and nonprescribed medications used * in past 2 days * PRESCRIB Total number of prescribed medications used in past 2 days * NONPRESC Total number of nonprescribed medications used in past 2 days ********** CREATE OUTPUT FILE * di "racd3p4.do for Cameron and Trivedi RACD chapter 3" ********** READ DATA * * The data are in ascii file racd6d1.asc * There are 5190 observations on 20 variables with one lines per obs * The format is F3.0,F5.2,F7.4,F5.2,12F4.0,4F3.0 * but since there is a blank between each observation it can be read in free format. infile SEX AGE AGESQ INCOME LEVYPLUS FREEPOOR FREEREPA ILLNESS ACTDAYS HSCORE /* */ CHCOND1 CHCOND2 DVISITS NONDOCCO HOSPADMI HOSPDAYS MEDICINE PRESCRIB /* */ NONPRESC CONSTANT using racd3.asc ********** DATA TRANSFORMATIONS * ******** CHECK DATA: DESCRIPTIVE STATISTICS * describe summarize ******** SAVE DATA AS STATA DATA SET * * save racd3p4, replace ********** POISSON REGRESSION * poisson DVISITS SEX AGE AGESQ INCOME LEVYPLUS FREEPOOR FREEREPA ILLNESS ACTDAYS HSCORE /* */ CHCOND1 CHCOND2 ********** CLOSE OUTPUT log close