* R. Carter Hill, William E. Griffiths and Guay C. Lim, * Principles of Econometrics, Third Edition, Wiley, 2008. * Chapter 16.6.3 Poisson Regression SAMPLE 1 1610 * Note: In the data file olympics.shd missing values are coded as -99999 READ (olympics.shd) country year gdp pop gold silver bronze medaltot & host planned soviet * The SET SKIPMISS command turns on the automatic deletion of * missing observations from estimation commands. SET SKIPMISS NOWARNMISS NOWARNSKIP * Compare summary statistics with the table reported in the * description file olympicsDEF.shd STAT / ALL * Work with data for the year 1988. SKIPIF (YEAR.NE.88) * Calculate and list medians STAT pop gdp / MEDIAN=med PRINT med GENR lnpop=LOG(pop) GENR lngdp=LOG(gdp) GEN1 m1=LOG(med:1) GEN1 m2=LOG(med:2) * A model of medal totals at the Olympic Games * Estimation - Table 16.6, page 440 ML medaltot lnpop lngdp / TYPE=EPOISSON COEF=B * Predict the number of medals won for a country with median * population and median GDP. * On the TEST command the variable names represent the coefficients. TEST exp(constant + lnpop*m1 + lngdp*m2) * Check the calculation done by the TEST commnad GEN1 medal = exp(B:1*LOG(med:1) + B:2*LOG(med:2) + B:3) PRINT medal STOP