30
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.

Economics 105: Statistics

  • Upload
    nellie

  • View
    60

  • Download
    0

Embed Size (px)

DESCRIPTION

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. - PowerPoint PPT Presentation

Citation preview

Page 1: Economics 105: Statistics

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.

Page 2: Economics 105: Statistics

Breusch-Pagan test1. Estimate the model by OLS

2. Obtain the squared residuals, 3. Run

4. Do the whole model F-test, rejection indicates heteroskedasticity. Assumes

Breusch, T.S. and A.R. Pagan (1979), “A Simple Test for Heteroskedasticity and

Random Coefficient Variation,” Econometrica 50, pp. 987 - 1000.

Page 3: Economics 105: Statistics

Breusch-Pagan test (not needing ) 1. Estimate the model by OLS

2. Obtain the squared residuals, 3. Run

keeping the R2 from this regression, call it4. Test statistic

Rejection indicates heteroskedasticity. .

Page 4: Economics 105: Statistics

Breusch-Pagan tests

Page 5: Economics 105: Statistics

White test1. Estimate the model by OLS

2. Obtain the squared residuals, 3. Estimate

4. Do the whole model F-test, rejection indicates heteroskedasticity

White, H. (1980), “A Heteroskedasticity-Consistent Covariance Matrix Estimator and a

Direct Test for Heteroskedasticity,” Econometrica 48, pp. 817 - 838.

Page 6: Economics 105: Statistics

White test• Adds squares & cross products of all X’s• Advantages

– no assumptions about the nature of the het.• Disadvantages

– Rejection (a statistically significant White test statistic) may be caused by het or it may be due to specification error; it’s a nonconclusive test– Number of covariates rises quickly– so could also run since the predicted values are functions of the X’s (and the estimated parameters) and do F-test

Page 7: Economics 105: Statistics

White test

Page 8: Economics 105: Statistics

Violations of GM AssumptionsAssumption Violation

“well-specified model” (1) &

(5)

zero conditional mean of errors (2)

Wrong functional formOmit Relevant Variable (Include Irrelevant Var)Errors in VariablesSample selection bias, Simultaneity bias

No serial correlation in errors (4)

constant, nonzero mean due to systematically +/- measurement error in Y

can only assess theoretically

Heteroskedastic errors

Homoskedastic errors (3)

There exists serial correlation in errors

Page 9: Economics 105: Statistics

Time Series: Multiple Regression•Assumptions• (1)

– Linear function in the parameters, plus error– Variation in Y is caused by , the error (as well as X)

• (2) – Sources of error

• Idiosyncratic, “white noise” • Measurement error on Y• Omitted relevant explanatory variables

– If (2) holds, we have exogenous explanatory vars– If some Xj is correlated with error term for some reason, then that Xj is an endogenous explanatory var

Page 10: Economics 105: Statistics

Time Series:Multiple Regression•Assumptions• (3)

– Homoskedasticity•(4)

– No autocorrelation• (5)

– Errors and the explanatory variables are uncorrelated

• (6)– Errors are i.i.d. normal

Page 11: Economics 105: Statistics

Time Series: Multiple Regression• Assumption (7) No perfect multicollinearity

– no explanatory variable is an exact linear function of other X’s– Venn diagram

• Other implicit assumptions – data are a random sample of n observations from proper population– n > K– the little xij’s are fixed numbers (the same in repeated samples) or they are realizations of random variables, Xij, that are independent of error term & then inference is done CONDITIONAL on observed values of xij’s

Page 12: Economics 105: Statistics

Nature of Serial Correlation• Violation of (4)•

• Error in period t is a function of error in prior period alone: first-order autocorrelation, denoted AR(1) for “autoregressive” process

• Usual assumptions apply to new error term

• is positive serial correlation• is negative serial correlation

Page 13: Economics 105: Statistics

Nature of Serial Correlation• Error in period t can be a function of error in more

than one prior period • Second-order serial correlation

• Higher orders generated analogously • Seasonally-based serial correlation

Page 14: Economics 105: Statistics

Causes of Serial Correlation• The error term in the regression captures

• Measurement error• Omitted variables, that are uncorrelated with the

included explanatory variables (hopefully)• Frequently factors omitted from the model are correlated over

time

1. Persistence of shocks• Effects of random shocks (e.g., earthquake, war, labor

strike) often carry over through more than one time period2. Inertia

• times series for GNP, (un)employment, output, prices, interest rates, etc. follow cycles, so that successive observations are related

Page 15: Economics 105: Statistics

Causes of Serial Correlation3. Lags

• Past actions have a strong effect on current ones• Consumption last period predicts consumption this period

4. Misspecified model, incorrect functional form5. Spatial serial correlation

• In cross-sectional data on regions, a random shock in one region can cause the outcome of interest to change in adjacent regions

• “Keeping up with the Joneses”

Page 16: Economics 105: Statistics

Consequences for OLS Estimates• Using an OLS estimator when the errors are autocorrelated

results in unbiased estimators• However, the standard errors are estimated incorrectly

– Whether the standard errors are overstated or understated depends on the nature of the autocorrelation

– For positive AR(1), standard errors are too small!– Any hypothesis tests conducted could yield erroneous results– For positive AR(1), may conclude estimated coefficients ARE

significantly different from 0 when we shouldn’t !• OLS is no longer BLUE

– A pattern exists in the errors • Suggesting an estimator that exploited this would be more efficient

Page 17: Economics 105: Statistics

Detection of Serial Correlation• Graphical

Page 18: Economics 105: Statistics

Detection of Serial Correlation• Graphical

no obvious pattern—the errors seem

random. Sometimes, however,

the errors follow a pattern—they are correlated across

observations, creating a situation in which

the observations are not independent with

one another.

Page 19: Economics 105: Statistics

Here the residuals do not seem

random, but rather seem to follow a

pattern.

Detection of Serial Correlation

Page 20: Economics 105: Statistics

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

Page 21: Economics 105: Statistics

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

hypothesisThe sampling distributionof 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 limitsfor the critical value of the test.

Page 22: Economics 105: Statistics

Detection: The Durbin-Watson Test• Durbin and Watson derived upper and lower

limits such that d1 d* du

• They developed the following decision rule

Page 23: Economics 105: Statistics

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

Page 24: Economics 105: Statistics

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

Page 25: Economics 105: Statistics

Serial Correlation Example• What is the effect of the price of oil on the number of wells drilled in the U.S.?•

Year

Total Wells Drilled

real price per bbl

Average Price per bbl

Producer Price Index

1930 212327.98657

7 1.19 14.9

1931 12432 5.15873 0.65 12.6

1932 150407.76785

7 0.87 11.2

1933 123125.87719

3 0.67 11.4

1934 189177.75193

8 1 12.9

1935 214207.02898

6 0.97 13.81987 3519414.9805

4 15.4 102.8

1988 32479 11.76801 12.58 106.9

1989 2782414.1354

7 15.86 112.2

1990 27941 17.2227 20.03 116.3

1991 2996014.1630

9 16.5 116.5

Page 26: Economics 105: Statistics

Serial Correlation Example• What is the effect of the price of oil on the number of wells drilled in the U.S.?•

Page 27: Economics 105: Statistics

Serial Correlation Example• Analyze residual plots … but be careful …

Page 28: Economics 105: Statistics

Serial Correlation Example• Remember what serial correlation is …

• This plot only “works” if obs number is in same order as the unit of time

Page 29: Economics 105: Statistics

Serial Correlation Example• Same graph when plot versus “year”

• Graphical evidence of serial correlation

Page 30: Economics 105: Statistics

Serial Correlation Example• Calculate DW test statistic• Compare to critical value at chosen sig level

– 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

• Since .192 < 1.55, reject H0: = 0 in favor of H1: > 0 at α=5%

ObservationPredicted Total Wells Drilled Residuals e(t-1) e(t) - e(t-1) (e(t)-e(t-1))^2 e(t)^2 Year

1 31744.01844 -10512.01844 110502532 1930

2 24780.30007 -12348.30007 -10512 -1836.28 3371930.199 152480515 1931

3 31205.40913 -16165.40913 -12348.3 -3817.11 14570321.58 261320452 1932

4 26549.55163 -14237.55163 -16165.4 1927.857 3716634.527 202707876 1933

5 31166.20738 -12249.20738 -14237.6 1988.344 3953512.848 150043081 1934

6 29385.89982 -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

SUM 1257013355 6517936259