Top Banner
0 10 20 30 40 50 60 70 80 0 5 10 15 20 25 30 35 40 Monthly Natural Gas Use and Temperature Average Daily Temperature Thousands of cubic feet
29

Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Jan 16, 2016

Download

Documents

Brent Pierce
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

0 10 20 30 40 50 60 70 800

5

10

15

20

25

30

35

40

Monthly Natural Gas Use and Temperature

Average Daily Temperature

Thou

sand

s of

cub

ic fe

et

Page 2: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Non-continuous Relationships

If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can be used to estimate two sets of coefficients and intercepts for the independent variable.

For example, if natural gas usage is not affected by temperature when the temperature rises above 60 degrees, we could have:Gas usage = b0 + b1(GT60) + b2(Temp) + b3(GT60)(Temp) where GT60 is a dummy equal to 1 when the temperature is above 60 degrees

Page 3: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Non-continuous Relationships

Note that at temperatures above 60 degrees the net effect of a 1 degree increase in temperature on gas usage is -0.056 (-.866+.810) and the estimated intercept is 6.4 (53.0-46.6)

  CoefficientsStandard Error t Stat P-value

Intercept 53.002 2.415 21.95 7.48E-18

GT60 -46.623 16.682 -2.79 0.0098

Temp -0.866 0.0595 -14.56 1.02E-13

(GT60)(Temp) 0.810 0.255 3.18 0.0039

Page 4: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Interaction Terms

You can try to control for interactions between two variables by including a variable that is the product of two independent variables.

For example, assume we were estimating the salaries of baseball players. If there was a premium paid to players that were both good fielders and good hitters, we might want to include an interaction term for hitting and fielding in the model.

Page 5: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Standardized Coefficients

When the regression model is estimated after standardizing the values of the dependent and independent variables.

21

2

2

1

1

210ˆ

2211

xxy

x

ix

x

ix

y

iy

zbzbbz

s

xxz

s

xxz

s

yyz

Page 6: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Standardized Coefficients

Unstandardized Standardized Coefficients Coefficients

B Std. Err. Beta t Sig.(Constant) -14.485 4.038 -3.587 .000

Weight -.007 .000 -.706 -14.177 .000 Year .761 .050 .360 15.262 .000 Cylinders -.074 .232 -.016 -.320 .749a Dependent Variable: MPG

Standardized coefficients can be used to compare the magnitude of the effects of the independent variables.

Page 7: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Standardized Residuals

iyy

yy

ii

hss

s

yy

ii

ii

1

ˆ

ˆ

ˆ

Where s is the standard error of estimate and hi is the leverage of observation i. Leverage is determined by the difference between the value of the independent variables and their means.

Page 8: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Standardized Residuals

The random deviation in the value of y, e, is assumed to be normally distributed. Looking at the standardized residuals gives some indication if that is true. Values should lie within 2 standard deviations of 0. Values greater than 2 may indicate the presence of outliers.

Page 9: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Residuals for MPG ExampleMPG Predicted Residual

StandardizedResidual

14.00 14.63 -0.63 -0.1815.00 13.64 1.36 0.4014.00 18.04 -4.04 -1.1824.00 23.00 1.00 0.2922.00 19.84 2.16 0.6318.00 20.23 -2.23 -0.6521.00 21.45 -0.45 -0.1327.00 24.58 2.42 0.7126.00 26.50 -0.50 -0.1525.00 21.04 3.96 1.15

... … … …

Page 10: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Distribution of Standardized Residuals

Page 11: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Summary of Issues in Building Models

• Check for multicollinearity• Look for outliers• Check residuals for nonlinear relationships• Check residuals for hetroscedasticy• Were all relevant variables included?

Page 12: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Time Series Data

Observations on a variable measured over successive periods of time.

Page 13: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Components of a Time SeriesTrend – The long-run movement of a time series

Seasonal component – The component of a time series that shows a periodic pattern over a year

Cyclical component – The component of a time series related to the business cycle

Irregular component – The random variation in a time series not accounted for by the other components

Page 14: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Smoothing a Time SeriesSmoothing removes the irregular component of a time series.

It can be used to forecast if the variable has no significant trend, cyclical, or seasonal effects.

It can also be used to investigate whether there is a trend in the data.

Page 15: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Smoothing TechniquesMoving average:

Weighted moving average:A moving average in which more recent values are given heavier weights

Exponential smoothing:When the weight on an observation decreases exponentially as time passes

n

values n recent most

AverageMoving

Page 16: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Example, Moving AveragesYear, Quarter

Sales

2008, 1 102008,2 142008, 3 82008, 4 162009, 1 62009, 2 182009, 3 8

Where the weights are .1, .2, .3, and .4; oldest to most recent

Moving average

Weighted moving average*

12 12.611 10.212 1312 11.4

Page 17: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Exponential Smoothing

Ft+1 = aYt + (1 – a)Ft

Ft+1 = Forecast for period t+1 = a Smoothing constant

Yt = Value of the time series in period tFt = Forecast for time t

Page 18: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Example, Moving AveragesYear, Quarter Sales Exponentially

smoothed forecast

2008, 1 102008,2 14 10.002008, 3 8 12.402008, 4 16 9.762009, 1 6 13.502009, 2 18 9.002009, 3 8 14.402009, 4 10.56

Assumes a equals 0.6

Page 19: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Estimating the Trend

Tt = b0 + b1tTt = trend value of time series in period tb0 = intercept in trend lineb1 = slope of trend linet = time

Page 20: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Example, TrendYear, Quarter

Time Sales Trend line

2008, 1 0 100 1042008,2 1 120 114.52008, 3 2 115 1252008, 4 3 150 135.52009, 1 4 140 1462009, 2 5 165 156.52009, 3 6 160 167

Tt = 104 + 10.5(t)

Page 21: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Time Series and Trend

0 1 2 3 4 5 60

20

40

60

80

100

120

140

160

180

Sales Trend line

Page 22: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Time Series and Nonlinear Trends

0 1 2 3 4 5 60

50

100

150

200

250

300

Time seriesTrend

Page 23: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Nonlinear Trends

• Make the trend a nonlinear function of time, such as:

y = b0 + b1t + b2t2

• If there is a constant percentage change in y over time use the natural log of y as the dependent variable:

ln(y) = b0 + b1tWhich corresponds to:

y = b0(tb1)

Page 24: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Cyclical Variation

If there is cyclical variation there will be evidence of a correlation between the variable and GDP (remember to adjust for inflation).

When forecasting you would need to include a leading indicator into the model.Yt = b0 + b1t +b2(housing starts in t-1)

Page 25: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Seasonal Variation

Seasonal index – Assumes there is a constant percentage difference from the trend in a given season

Page 26: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Seasonal IndexInterpret the index as the ratio of the average value for that season to the average for the year.

How would you interpret an index value of 0.9 for the first quarter? On average values in the first quarter are 90% of the annual average.

What if the index for the 2nd quarter was 1.20?On average values in the 2nd quarter are 20% above the annual average

Page 27: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.
Page 28: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Examples

Assume the following quarterly indices:Q1 0.8Q2 1.1Q3 0.7Q4 1.4

Deseasonalize the following data:Q1 Q2 Q3 Q4400 660 560 700500 600 800 500

Page 29: Non-continuous Relationships If the relationship between the dependent variable and an independent variable is non-continuous a slope dummy variable can.

Examples

Assume t equals 1 in the first quarter of 2002 and the estimated trend for sales is T = 100 + 50t. What is the forecast for the 4th quarter of 2009?T = 100 + 50(32) = 1700

What is the seasonalized forecast?1700(1.4) = 2380