1 Lab Four Postscript Econ 240 C. 2 Airline Passengers.

Slides:



Advertisements
Similar presentations
The essentials managers need to know about Excel
Advertisements

EViews Student Version. Today’s Workshop Basic grasp of how EViews manages data Creating Workfiles Importing data Running regressions Performing basic.
Understanding Microsoft Excel
Part II – TIME SERIES ANALYSIS C5 ARIMA (Box-Jenkins) Models
Analysis of Sales of Food Services & Drinking Places Julianne Shan Ho-Jung Hsiao Christian Treubig Lindsey Aspel Brooks Allen Edmund Becdach.
Time Series Building 1. Model Identification
Business Forecasting Chapter 10 The Box–Jenkins Method of Forecasting.
Forecasting Gas Prices Rory Hofstatter Shu-He Lin Chia-Jung Liu Claudia Muyle Sooyeon Shin Adam Sutton.
Forecasting JY Le Boudec 1. Contents 1.What is forecasting ? 2.Linear Regression 3.Avoiding Overfitting 4.Differencing 5.ARMA models 6.Sparse ARMA models.
1 ECON 240C Lecture Outline Box-Jenkins Passengers Box-Jenkins Passengers Displaying the Forecast Displaying the Forecast Recoloring Recoloring.
1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and Hypothesis Testing.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
Econ 240 C Lecture I. Work in Groups II. You will be graded based on a PowerPoint presentation and a written report. III. Your report should have.
1 Econ 240 C Lecture White noise inputoutput 1/(1 – z) White noise input output Random walkSynthesis 1/(1 – bz) White noise input output.
1 Econ 240 C Lecture Time Series Concepts Analysis and Synthesis.
1 Lecture Eleven Econ 240C. 2 Outline Review Stochastic Time Series –White noise –Random walk –ARONE: –ARTWO –ARTHREE –ARMA(2,2) –MAONE*SMATWELVE.
Revenue Passenger Miles (RPM) Brandon Briggs, Theodore Ehlert, Mats Olson, David Sheehan, Alan Weinberg.
1 Identifying ARIMA Models What you need to know.
Econ 240C Lecture Part I: Forecasting Time Series Housing Starts Housing Starts Labs 5 and 7 Labs 5 and 7.
Data Sources The most sophisticated forecasting model will fail if it is applied to unreliable data Data should be reliable and accurate Data should be.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
1 Econ 240C Lecture Five Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one.
1 Econ 240 C Lecture 3. 2 Time Series Concepts Analysis and Synthesis.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
Econ 240 C Lecture Outline Exponential Smoothing Exponential Smoothing Back of the envelope formula: geometric distributed lag: L(t) = a*y(t-1)
1 Econ 240C Lecture Five. 2 Outline w Box-Jenkins Models: the grand design w What do you need to learn? w Preview of partial autocorrelation function.
1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting.
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: capumfg Example: capumfg Polar form Polar form.
1 Takehome One Excaus:Price of US $ in Canadian $
1 ECON 240C Lecture 8. 2 Part I. Economic Forecast Project Santa Barbara County Seminar –April 17, 2003 URL:
Global Analysts Eirik Skeid, Anders Graham, Bradley Moore, Matthew Scott Tor Seim, Steven Comstock.
Project Average Weekly Hours, Manufacturing.
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: change in housing starts Example: change in housing.
1 Econ 240C Lecture Five Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one.
Introduction At the start of most beginning economics courses we learn the economics is a science aimed toward answering the following questions: 1.What.
Econ 240 C Lecture Re-Visit Santa Barbara South Coast House Price Santa Barbara South Coast House Price UC Budget, General Fund UC Budget, General.
1 ECON 240C Lecture 8. 2 Part I. Economic Forecast Project Santa Barbara County Seminar Santa Barbara County Seminar  April 22, 2004 (April 17, 2003)
1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and Hypothesis Testing.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail sales –Add a quadratic term –Use both models to.
Copyright © 2009 Pearson Education, Inc. CHAPTER 5: Exponential and Logarithmic Functions 5.1 Inverse Functions 5.2 Exponential Functions and Graphs 5.3.
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: change in housing starts Example: change in housing.
Econ 240 C Lecture Part I: Exponential Smoothing Exponential smoothing is a technique that is useful for forecasting short time series where there.
BOX JENKINS METHODOLOGY
Lesson 1 – Microsoft Excel The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
EQ: How do you use the properties of exponents and logarithms to solve equations?
#1 EC 485: Time Series Analysis in a Nut Shell. #2 Data Preparation: 1)Plot data and examine for stationarity 2)Examine ACF for stationarity 3)If not.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Exam 2 review: Quizzes 7-12* (*) Please note that.
Lecture 7: Forecasting: Putting it ALL together. The full model The model with seasonality, quadratic trend, and ARMA components can be written: Ummmm,
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
Introducing ITSM 2000 By: Amir Heshmaty Far. S EVERAL FUNCTION IN ITSM to analyze and display the properties of time series data to compute and display.
© Buddy Freeman, Independence of error assumption. In many business applications using regression, the independent variable is TIME. When the data.
Lesson 1 – Microsoft Excel * The goal of this lesson is for students to successfully explore and describe the Excel window and to create a new worksheet.
1 Ka-fu Wong University of Hong Kong EViews Commands that are useful for Assignment #2.
3.7 – Implicit Differentiation An Implicit function is one where the variable “y” can not be easily solved for in terms of only “x”. Examples:
Logarithms 1 Converting from Logarithmic Form to Exponential Form and Back 2 Solving Logarithmic Equations & Inequalities 3 Practice Problems.
LINREG linreg(options) depvar start end residuals # list where: depvar The dependent variable. start endThe range to use in the regression. The default.
Forecasting (prediction) limits Example Linear deterministic trend estimated by least-squares Note! The average of the numbers 1, 2, …, t is.
Common Logarithms - Definition Example – Solve Exponential Equations using Logs.
The Box-Jenkins (ARIMA) Methodology
Stat 112 Notes 14 Assessing the assumptions of the multiple regression model and remedies when assumptions are not met (Chapter 6).
2/25/ lecture 121 STATS 330: Lecture 12. 2/25/ lecture 122 Diagnostics 4 Aim of today’s lecture To discuss diagnostics for independence.
1 Econ 240C Lecture Five. 2 Part I: Time Series Components Model w The conceptual framework for inertial (mechanical) time series models: w Time series.
Logarithms – Solving, Inverses, and Graphs To graph a logarithmic function simply enter it into your calculator: Graph y = log 10 x Since your calculator.
Introduction to Eviews Eviews Workshop September 6, :30 p.m.-3:30 p.m.
Case study 4: Multiplicative Seasonal ARIMA Model
Dynamic Models, Autocorrelation and Forecasting
Properties of Logarithms
Introduction to Logarithms
Eviews Tutorial for Labor Economics Lei Lei
BOX JENKINS (ARIMA) METHODOLOGY
Presentation transcript:

1 Lab Four Postscript Econ 240 C

2 Airline Passengers

3

4 Pathologies of Non-Stationarity Trend in variance Trend in variance Trend in mean Trend in mean seasonal seasonal

5 Fix-Up: Transformations Natural logarithm Natural logarithm First difference: (1-Z) First difference: (1-Z) Seasonal difference: (1-Z 12 ) Seasonal difference: (1-Z 12 )

6

7

8

9

10

11

12

13 Proposed Model Autocorrelation Function Autocorrelation Function  Negative lag one  Negative lad twelve Trial model SDDLNBJP c ma(1) ma(12) Trial model SDDLNBJP c ma(1) ma(12)  Sddlnbjp(t) = c + resid(t)  Resid(t) = wn(t)– a 1 wn(t-1) – a 12 wn(t-12)

14

15 Is this model satisfactory? Diagnostics Diagnostics  Goodness of fit: how well does the model (fitted value) track the data (observed value)? Plot of actual Vs. fitted  Is there any structure left in the residual? Correlogram of the residual from the model.  Is the residual normal? Histogram of the residual.

16 Plot of actual, fitted, and residual

17 Correlogram of the residual from the model

18 Histogram of the residual

19 Forecasting Seasonal Difference in the Fractional Change Estimation period: – Estimation period: – Forecast period: – Forecast period: –

20 Eviews forecast command window

21 Eviews plot of forecast plus or minus two standard errors Of the forecast

22 Eviews spreadsheet view of the forecast and the standard Error of the forecast

23 Using the Quick Menu and the show command to create Your own plot or display of the forecast

24

25 Note: EViews sets the forecast variable equal to the observed Value for

26 To Differentiate the Forecast from the observed variable …. In the spread sheet window, click on edit, and copy the forecast values for to a new column and paste. Label this column forecast. In the spread sheet window, click on edit, and copy the forecast values for to a new column and paste. Label this column forecast.

27 Note: EViews sets the forecast variable equal to the observed Value for

28 Displaying the Forecast Now you are ready to use the Quick menu and the show command to make a more pleasing display of the data, the forecast, and its approximate 95% confidence interval. Now you are ready to use the Quick menu and the show command to make a more pleasing display of the data, the forecast, and its approximate 95% confidence interval.

29 Qick menu, show command window

30

31 Recoloring The seasonal difference of the fractional change in airline passengers may be appropriately pre- whitened for Box-Jenkins modeling, but it is hardly a cognitive or intuitive mode for understanding the data.Fortunately, the transformation process is reversible and we recolor, I.e put back the structure we removed with the transformations by using the definitions of the transformations themselves The seasonal difference of the fractional change in airline passengers may be appropriately pre- whitened for Box-Jenkins modeling, but it is hardly a cognitive or intuitive mode for understanding the data.Fortunately, the transformation process is reversible and we recolor, I.e put back the structure we removed with the transformations by using the definitions of the transformations themselves

32 Recoloring Summation or integration is the opposite of differencing. Summation or integration is the opposite of differencing. The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) But if we know x(t-1) at time t-1, and we have a forecast for (1-Z) x(t), then we can rearrange the differencing equation and do summation to calculate x(t): x(t) = x 0 (t-1) + E t-1 (1-Z) x(t) But if we know x(t-1) at time t-1, and we have a forecast for (1-Z) x(t), then we can rearrange the differencing equation and do summation to calculate x(t): x(t) = x 0 (t-1) + E t-1 (1-Z) x(t) This process can be executed on Eviews by using the Generate command This process can be executed on Eviews by using the Generate command

33 Recoloring In the case of airline passengers, it is easier to undo the first difference first and then undo the seasonal difference. For this purpose, it is easier to take the transformations in the order, natural log, seasonal difference, first difference In the case of airline passengers, it is easier to undo the first difference first and then undo the seasonal difference. For this purpose, it is easier to take the transformations in the order, natural log, seasonal difference, first difference Note: (1-Z)(1-Z 12 )lnBJPASS(t) = (1- Z 12 )(1-Z)lnBJPASS(t), I.e the ordering of differencing does not matter Note: (1-Z)(1-Z 12 )lnBJPASS(t) = (1- Z 12 )(1-Z)lnBJPASS(t), I.e the ordering of differencing does not matter

34

35 Correlogram of Seasonal Difference in log of passengers. Note there is still structure, decay in the ACF, requiring A first difference to further prewhiten

36 As advertised, either order of differencing results in the Same pre-whitened variable

37 Using Eviews to Recolor DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP( ) = SDlnBJPASS( ) – SDlnBJPASS( ) DSDlnBJP( ) = SDlnBJPASS( ) – SDlnBJPASS( ) So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASS( ) SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASS( ) We can use this formula in iterative fashion as SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASSF( ), but we need an initial value for SDlnBJPASSF( ) since this is the last time period before forecasting. We can use this formula in iterative fashion as SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASSF( ), but we need an initial value for SDlnBJPASSF( ) since this is the last time period before forecasting.

38 The initial value This problem is easily solved by generating SDlnBJPASSF( ) = SDlnBJPASS( ) This problem is easily solved by generating SDlnBJPASSF( ) = SDlnBJPASS( )

39 Recoloring: Generating the forecast of the seasonal difference in lnBJPASS

40

41 Recoloring to Undo the Seasonal Difference in the Log of Passengers Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), Rearranging and putting in terms of the forecasts lnBJPASSF( ) = lnBJPASS( ) + SDlnBJPASSF( ) Rearranging and putting in terms of the forecasts lnBJPASSF( ) = lnBJPASS( ) + SDlnBJPASSF( ) In this case we do not need to worry about initial values in the iteration because we are going back twelve months and adding the forecast for the seasonal difference In this case we do not need to worry about initial values in the iteration because we are going back twelve months and adding the forecast for the seasonal difference

42

43

44 The Harder Part is Over Once the difference and the seasonal difference have been undone by summation, the rest requires less attention to detail, plus double checking, to make sure your commands to Eviews were correct. Once the difference and the seasonal difference have been undone by summation, the rest requires less attention to detail, plus double checking, to make sure your commands to Eviews were correct.

45

46 The Last Step To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential

47

48