Economics 105: Statistics •Please practice your RAP, so you can keep it to 7 minutes. We have lots of them to do. • please copy your Powerpoint file to your stats P:\economics\Eco 105 (Statistics) Foley\userid\ lab space. Tue Apr 24: Thompson, Shanor, Nielsen, Moniz-Soares, Maher, Dugan, Burke, Adabayeri Thur Apr 26: Ryger-Wasserman, Lockwood, Gordon, Givens, Christ, Blasey, Bernert, Avinger Tue May 1: Yearwood, Swany, Ream, Polak, Pettiglio, Murray, Esposito, Bajaj Thur May 3: Yan, Tompkins, Mwangi, Mooney, Lockhart, Clune, Charles, Bourgeois • Review #3 due Monday May 7, by 4:30 PM. Violations of GM Assumptions Assumption Violation “well-specified model” (1) & (5) Wrong functional form Omit Relevant Variable (Include Irrelevant Var) Errors in Variables Sample selection bias, Simultaneity bias zero conditional mean of errors (2) constant, nonzero mean due to systematically +/- measurement error in Y can only assess theoretically Homoskedastic errors (3) Heteroskedastic errors No serial correlation in errors (4) There exists serial correlation in errors Detection: The Durbin-Watson Test • Provides a way to test H0: = 0 • It is a test for the presence of first-order serial correlation • The alternative hypothesis can be – 0 – > 0: positive serial correlation • Most likely alternative in economics – < 0: negative serial correlation • DW Test statistic is d n d= å (e - e t =2 t -1 t n åe t =1 2 t ) 2 Detection: The Durbin-Watson Test • To test for positive serial correlation with the Durbin-Watson statistic, under the null we expect d to be near 2 – The smaller d, the more likely the alternative hypothesis The sampling distribution of d depends on the values of the explanatory variables. Since every problem has a different set of explanatory variables, Durbin and Watson derived upper and lower limits for the critical value of the test. Detection: The Durbin-Watson Test • Durbin and Watson derived upper and lower limits such that d1 d* du • They developed the following decision rule Detection: The Durbin-Watson Test • To test for negative serial correlation the decision rule is • Can use a two-tailed test if there is no strong prior belief about whether there is positive or negative serial correlation—the decision rule is Serial Correlation • Table of critical values for Durbin-Watson statistic (table E11, page 833 in BLK textbook) •http://hadm.sph.sc.edu/courses/J716/Dw.html Serial Correlation Example • What is the effect of the price of oil on the number of wells drilled in the U.S.? Wellst = b0 + b1OilPricet + e t • Year Total Wells Drilled real price per bbl Avera ge Price per bbl Produ cer Price Index 1930 21232 7.986577 1.19 14.9 1931 12432 5.15873 0.65 12.6 1932 15040 7.767857 0.87 11.2 1933 12312 5.877193 0.67 11.4 1934 18917 7.751938 1 12.9 1935 21420 7.028986 0.97 13.8 1987 35194 14.98054 15.4 102.8 1988 32479 11.76801 12.58 106.9 1989 27824 14.13547 15.86 112.2 1990 27941 17.2227 20.03 116.3 1991 29960 14.16309 16.5 116.5 Serial Correlation Example • What is the effect of the price of oil on the number of wells drilled in the U.S.? • Welˆlst = 12076.6 + 2462.55 * OilPricet SUMMARY OUTPUT Regression Statistics Multiple R 0.806486157 R Square 0.650419921 Adjusted R Square 0.644593586 Standard Error 10422.6806 Observations 62 ANOVA df Regression Residual Total Intercept real SS MS F Significance F 1 12127108610 1.21E+10 111.6345 2.5537E-15 60 6517936259 1.09E+08 61 18645044869 Coefficients Standard Error t Stat P-value Lower 95% 12076.66238 2912.941825 4.145865 0.000108 6249.913083 2462.551305 233.0698428 10.56572 2.55E-15 1996.342358 Serial Correlation Example • Analyze residual plots … but be careful … Serial Correlation Example • Remember what serial correlation is … • This plot only “works” if obs number is in same order as the unit of time Serial Correlation Example • Same graph when plot versus “year” 30000 Residuals 20000 10000 0 1920 -10000 1930 1940 1950 1960 1970 1980 1990 -20000 -30000 Year • Graphical evidence of serial correlation 2000 Serial Correlation Example n • Calculate DW test statistic • Compare to critical value at chosen sig level d= å (e - e t =2 t -1 t )2 n åe t =1 = .192 2 t – dlower or dupper for 1 X-var & n = 62 not in table – dlower for 1 X-var & n = 60 is 1.55, dupper = 1.62 Predicted Total Wells Drilled Observation Residuals e(t-1) e(t) - e(t-1) 1 31744.01844 -10512.01844 2 24780.30007 -12348.30007 -10512 -1836.28 3 31205.40913 -16165.40913 -12348.3 4 26549.55163 -14237.55163 5 31166.20738 6 29385.89982 (e(t)-e(t-1))^2 e(t)^2 Year 110502532 1930 3371930.199 152480515 1931 -3817.11 14570321.58 261320452 1932 -16165.4 1927.857 3716634.527 202707876 1933 -12249.20738 -14237.6 1988.344 3953512.848 150043081 1934 -7965.899815 -12249.2 4283.308 18346723.71 63455559.9 1935 61 54488.44454 -26547.44454 -19062 -7485.46 56032054.78 704766811 1990 62 46953.99846 -16993.99846 -26547.4 9553.446 91268331.83 288795984 1991 1257013355 6517936259 SUM • Since .192 < 1.55, reject H0: = 0 in favor of H1: > 0 at α=5%