28
1 Lecture One Econ 240C

1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

  • View
    218

  • Download
    3

Embed Size (px)

Citation preview

Page 1: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

1

Lecture One

Econ 240C

Page 2: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

2

Einstein’s blackboard, Theory of relativity,Oxford, 1931

Page 3: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

3

Outline

• Pooling Time Series and Cross- Section

• Review: Analysis of Variance– one-way ANOVA– two-way ANOVA

• Pooling Examples

Page 4: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

4

Pooling

• Often you may have data sets vary both across individuals and also over time. For example, you may have macro data such as GDP but for several countries. You could analyze this data country by country, but it is also possible to pool the data and analyze it jointly rather than individually.

Page 5: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

5

The Rock Music Data

• In this data, individual teenagers are polled about how many minutes of rock music they listen to per day for each of the seven days of the week.

• There is variation across individual teenagers

• there is variation for a single teenager over time, i.e. the days of the week

Page 6: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

6

Example: Rock Music Data• Teen Sun. Mon. Tue. Wed. Th. Fri. Sat.• 1 65 40 32 48 60 75 110• 2 90 85 75 90 78 120 100• 3 30 30 20 25 30 60 70• 4 72 52 66 100 77 66 94• 5 70 88 47 73 78 67 78• 6 90 51 103 41 57 69 87• 7 43 72 66 39 57 90 73• 8 88 89 82 95 68 105 125• 9 96 60 80 106 57 81 80

• 10 60 92 72 45 72 77 90

Page 7: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Average Minutes of Rock Music Per Day

50.0

55.0

60.0

65.0

70.0

75.0

80.0

85.0

Sun Mon Tue Wed Th Fri Sat

Day of the Week

Min

ute

s

Page 8: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

8

One Way ANOVA Across Days of the Week

Page 9: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Anova: Single Factor

SUMMARYGroups Count Sum Average Variance

Sunday 200 13825 69.125 462.9742Monday 200 13919 69.595 502.1718Tuesday 200 14075 70.375 506.2758Wednsday 200 13559 67.795 540.7065Thursday 200 14123 70.615 483.7455Friday 200 15104 75.52 484.6227Saturday 200 16347 81.735 481.6128

ANOVASource of Variation SS df MS F P-value F critBetween Groups 28673.73 6 4778.955 9.662514 1.93E-10 2.105079Within Groups 688959.8 1393 494.5871

Total 717633.5 1399

Page 10: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

10

One Way ANOVA Across 200 Teenagers

Page 11: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Anova: Single Factor

SUMMARYGroups Count Sum Average Variance

1 7 430 61.42857 677.28572 7 638 91.14286 230.80953 7 265 37.85714 365.47624 7 527 75.28571 281.57145 7 501 71.57143 163.6196 7 498 71.14286 523.47627 7 440 62.85714 321.80958 7 652 93.14286 326.47629 7 560 80 310.3333

10 7 508 72.57143 269.9524

Selection: First Ten Teenagers

Page 12: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

ANOVASource of Variation SS df MS F P-value F critBetween Groups 209834.6 199 1054.445 2.491803 3.4E-21 1.187447Within Groups 507798.9 1200 423.1657

Total 717633.5 1399

Page 13: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

13

Two-Way ANOVAAcross both Days and Teens

• Controlling for both sources of variation reduces the unexplained sum of squares, “within groups” in EXCEL-speak, and hence makes the variation for days of the week and/or for teenagers, more significant since the F-statistic depends on the ratio of explained sum of squares to unexplained sum of squares and the latter is smaller per above.

Page 14: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Two-way ANOVA

ANOVASource of Variation SS df MS F P-value F critRows 209834.6 199 1054.445 2.627722 1.04E-23 1.187531Columns 28673.73 6 4778.955 11.90936 5.14E-13 2.106162Error 479125.1 1194 401.2773

Total 717633.5 1399

Page 15: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

15

Stacked Regressions

• GDP for two countries Canada and France, 1950-1992

• Estimating time trends:

• GDPi(t) = ci + di t + ei ,

• Note, on next slide, that there is a separate intercept for Canada, CAN that is one when the data is Canadian and zero when the data is French. Ditto for time and GDP

Page 16: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

CAN FRA GDP_CAN GDP_FRA TIME_CAN TIME_FRA1 0 6209 0 0 01 0 6385 0 1 01 0 6752 0 2 01 0 6837 0 3 01 0 6495 0 4 01 0 6907 0 5 01 0 7349 0 6 01 0 7213 0 7 01 0 7061 0 8 01 0 7180 0 9 01 0 7132 0 10 01 0 7137 0 11 01 0 7473 0 12 01 0 7722 0 13 01 0 8088 0 14 0

Page 17: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

17

Stacked Data

• Separate intercepts can be typed in as well as separate time trends, but this becomes more laborious for 7 countries than for two.

• Pooling is a process in Eviews for automating stacked regressions

Page 18: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

18

A Stacked Regression Time Trend

• (GDP_CAN + GDP_FRA) = cCAN CAN + dCAN TIME_CAN + cFRA FRA + dFRA

TIME_FRA

Page 19: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Dependent Variable: GDPSTACKEDMethod: Least SquaresSample: 1 86Included observations: 86

Variable Coefficient Std. Error t-Statistic Prob

CAN 4899.908 183.3413 26.72562 0FRA 3804.796 183.3413 20.75254 0.0000TIME_CAN 295.6356 7.516259 39.33281 0.0000TIME_FRA 257.8192 7.516259 34.30154 0.

R-squared 0.973 Mean dependent var 10163.Adjusted R-squared 0.972S.D. dependent var 3640.218S.E. of regression 611.6406 Akaike info criterion 15.71556Sum squared resid 3067654 Schwarz criterion 15.82972Log likelihood-671.769 Durbin-Watson stat 0.296751

Page 20: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

20

Stacked Regression Results

• Note the intercept for Canada is 4899.908 with a standard error of 183.3; the time trend is 295.6356 with a standard error of 7.51;

• What would result if we estimated each country separately, as illustrated for Canada on the next slide. The estimated intercept and slope is the same but the standard errors are larger and t-stats lower.

Page 21: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

Dependent Variable: GDP_CANMethod: Least SquaresSample: 1 43Included observations: 43

Variable Coefficient Std. Error t-Statistic Prob. CAN 4899.908 228.2826 21.46422 0.0000TIME_CAN 295.6356 9.358675 31.58947 0.0000

R-squared 0.960535 Mean dependent var 11108.26 Adjusted R-squared 0.960 S.D. dependent var 3787.652 S.E. of regression 761.568 Akaike info criterion 16.15403Sum squared resid 23779447 Schwarz criterion 16.23595 Log likelihood-345.3117 Durbin-Watson stat 0.263534

Page 22: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

22

Pooling in EViews

• So that is the motivation for pooling and in Lab One on Wednesday we will learn how to accomplish pooling using Eviews.

Page 23: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

23

The Law of One Price

• If arbitrage is possible, then the price of a commodity will be the same everywhere, accounting for transportation and transactions costs

Page 24: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

24

Dark Northern Spring Wheat, 14%, Rotterdam cif, Gulf fob Plus Freight

0

50

100

150

200

250

300

350

Jul-7

1

Jul-7

2

Jul-7

3

Jul-7

4

Jul-7

5

Jul-7

6

Jul-7

7

Jul-7

8

Jul-7

9

Jul-8

0

Jul-8

1

Jul-8

2

Jul-8

3

Jul-8

4

Jul-8

5

Jul-8

6

Jul-8

7

Jul-8

8

Jul-8

9

Jul-9

0

Jul-9

1

Jul-9

2

Jul-9

3

Jul-9

4

Jul-9

5

Jul-9

6

Jul-9

7

Jul-9

8

Jul-9

9

Jul-0

0

Jul-0

1

Jul-0

2

Date

Pri

ce

Rotterdam cif

Gulf fob Plus Freight

Concept: evolutionary time series, cointegration

Page 25: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

25

4.0

4.4

4.8

5.2

5.6

6.0

75 80 85 90 95 00

LNDNSROTM LNDNSGLFXPLS

log of Rotterdam import pricelog of US Gulf Port export price plus freight rates

Page 26: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

26

-0.2

-0.1

0.0

0.1

0.2

0.3

75 80 85 90 95 00

LNRATIO

Log of ratio of import price to export price plus the freight rate

Concept: stationary time series,

Page 27: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

27

-40

-20

0

20

40

60

75 80 85 90 95 00

PRICEDIFF

Rotterdam export price minus the Gulf Port export price (plus freight rate)

Page 28: 1 Lecture One Econ 240C. 2 Einstein’s blackboard, Theory of relativity, Oxford, 1931

28

Reference

• Working Paper: John Pippenger and Llad Phillips, “Some Pitfalls in Testing the Law of One Price in Commodity Markets”

• Econ Home Page, Working Papers, 2005, series # 4-05– Read pages 1-5, scan the rest– Note concepts: cointegration, unit roots etc.,

topics in this course.