LINREG linreg(options) depvar start end residuals # list where: depvar The dependent variable. start endThe range to use in the regression. The default.

Slides:



Advertisements
Similar presentations
FINANCIAL TIME-SERIES ECONOMETRICS SUN LIJIAN Feb 23,2001.
Advertisements

Autocorrelation Functions and ARIMA Modelling
Autocorrelation and Heteroskedasticity
Regression Analysis.
Dates for term tests Friday, February 07 Friday, March 07
Using R for Time Series Analysis R is a package that can be downloaded for free.
1 Regression as Moment Structure. 2 Regression Equation Y =  X + v Observable Variables Y z = X Moment matrix  YY  YX  =  YX  XX Moment structure.
Forecasting Using the Simple Linear Regression Model and Correlation
Part II – TIME SERIES ANALYSIS C5 ARIMA (Box-Jenkins) Models
Time Series Building 1. Model Identification
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
R. Werner Solar Terrestrial Influences Institute - BAS Time Series Analysis by means of inference statistical methods.
Economics 310 Lecture 25 Univariate Time-Series Methods of Economic Forecasting Single-equation regression models Simultaneous-equation regression models.
Lecture 9 Today: Ch. 3: Multiple Regression Analysis Example with two independent variables Frisch-Waugh-Lovell theorem.
How should these data be modelled?. Identification step: Look at the SAC and SPAC Looks like an AR(1)- process. (Spikes are clearly decreasing in SAC.
BABS 502 Lecture 9 ARIMA Forecasting II March 23, 2009.
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.
Lecture 3 Cameron Kaplan
Modeling Cycles By ARMA
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.
BABS 502 Lecture 8 ARIMA Forecasting II March 16 and 21, 2011.
Estimating a VAR After making the necessary data transformations, you must define the equations to use in the VAR. Typically, you will use the following.
Nonlinear Estimation1 Formulas A formula is a (possibly) nonlinear mathematical relationship. A SERIES is a vector of numbers Formulas versus SET: –You.
© 2000 Prentice-Hall, Inc. Chap Forecasting Using the Simple Linear Regression Model and Correlation.
Simple Linear Regression
Multiple Linear Regression Response Variable: Y Explanatory Variables: X 1,...,X k Model (Extension of Simple Regression): E(Y) =  +  1 X 1 +  +  k.
BOX JENKINS METHODOLOGY
AR- MA- och ARMA-.
Introduction to Linear Regression and Correlation Analysis
Inference for regression - Simple linear regression
Preparing the Data1 RATS Dialog Interface WINDOWS: It is most convenient to use RATS using two windows: one for input and the other for output. When you.
STAT 497 LECTURE NOTES 2.
#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.
Intervention models Something’s happened around t = 200.
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Exam 2 review: Quizzes 7-12* (*) Please note that.
Tutorial for solution of Assignment week 39 “A. Time series without seasonal variation Use the data in the file 'dollar.txt'. “
Lecture 7: Forecasting: Putting it ALL together. The full model The model with seasonality, quadratic trend, and ARMA components can be written: Ummmm,
Chap 14-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 14 Additional Topics in Regression Analysis Statistics for Business.
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
It’s About Time Mark Otto U. S. Fish and Wildlife Service.
Chapter 5: Regression Analysis Part 1: Simple Linear Regression.
1 Multiple Regression Analysis y =  0 +  1 x 1 +  2 x  k x k + u.
Byron Gangnes Econ 427 lecture 3 slides. Byron Gangnes A scatterplot.
John G. Zhang, Ph.D. Harper College
STA 286 week 131 Inference for the Regression Coefficient Recall, b 0 and b 1 are the estimates of the slope β 1 and intercept β 0 of population regression.
MULTIVARIATE TIME SERIES & FORECASTING 1. 2 : autocovariance function of the individual time series.
Estimation Method of Moments (MM) Methods of Moment estimation is a general method where equations for estimating parameters are found by equating population.
Forecasting (prediction) limits Example Linear deterministic trend estimated by least-squares Note! The average of the numbers 1, 2, …, t is.
AUTOCORRELATION: WHAT HAPPENS IF THE ERROR TERMS ARE CORRELATED?
1 Prof. Dr. Rainer Stachuletz Multiple Regression Analysis y =  0 +  1 x 1 +  2 x  k x k + u 1. Estimation.
Dynamic Models, Autocorrelation and Forecasting ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
The Box-Jenkins (ARIMA) Methodology
Module 4 Forecasting Multiple Variables from their own Histories EC 827.
Seasonal ARIMA FPP Chapter 8.
2/25/ lecture 121 STATS 330: Lecture 12. 2/25/ lecture 122 Diagnostics 4 Aim of today’s lecture To discuss diagnostics for independence.
Econometric methods of analysis and forecasting of financial markets Lecture 3. Time series modeling and forecasting.
Subodh Kant. Auto-Regressive Integrated Moving Average Also known as Box-Jenkins methodology A type of linear model Capable of representing stationary.
Copyright © 2015 John, Wiley & Sons, Inc. All rights reserved. W ALTER E NDERS, U NIVERSITY OF A LABAMA A PPLIED E CONOMETRIC T IME S ERIES 4 TH E DITION.
Analysis of financial data Anders Lundquist Spring 2010.
1 Autocorrelation in Time Series data KNN Ch. 12 (pp )
Chapter 4: Basic Estimation Techniques
Chapter 4 Basic Estimation Techniques
Dynamic Models, Autocorrelation and Forecasting
Basic Estimation Techniques
Lecture 8 ARIMA Forecasting II
Applied Econometric Time Series Third Edition
Chapter 6: Autoregressive Integrated Moving Average (ARIMA) Models
Fundamentals of regression analysis 2
CHAPTER 16 ECONOMIC FORECASTING Damodar Gujarati
BOX JENKINS (ARIMA) METHODOLOGY
Presentation transcript:

LINREG linreg(options) depvar start end residuals # list where: depvar The dependent variable. start endThe range to use in the regression. The default is the largest common range of all variables in the regression. residualsSeries name for the residuals. Omit if you do not want to save the regression residuals. listThe list of explanatory variables.

Examples of LIN lin y # constant x lin y 1991: :8 # constant x lin y 1991: :8 resids # constant y{1 2 5} lin y / resids # constant y{1 to 4}

Internal Variables LINREG creates a number of variables that you can use in subsequent computations. A partial list of these variables is: %BETA The coefficient vector. The first coefficient estimated is %BETA(1), the second %BETA(2), and so on. For example, in the output for dlja above, the constant is %BETA(1), the coefficient for dlja{1} is %BETA(2), and so forth. %tstats The vector of t-stats %NDF Degrees of freedom. %NOBS Number of observations. %NREG Number of regressors. %RSS Residual sum of squares. %RSQUARED Centered R 2 (i.e, the usual measure of R 2 ) %SEESQ Standard error of estimate squared

Correlate Correlate(options) series start end (saveseries) where: series The series used to compute the correlations. Results= series used to save the correlations NUMBER= The number of autocorrelations to compute. The default is the integer value of one-fourth the total number of observations. PARTIAL=Series for the partial autocorrelations. If you omit this option, the PACF will not be calculated. QSTATSUse this option if you want the Ljung-Box Q- statistics. SPAN=Use with qstats to set the width of the intervals tested. For example, with quarterly data, you can set span = 4, to obtain Q(4), Q(8), Q(12), and so forth.

The AIC and the SBC com sbc = nobs*log(%rss) + %nreg*log(%nobs) compute aic = %nobs*log(%rss) + 2*%nreg display 'AIC' aic 'SBC' sbc

BOXJENK BOXJENK depvar start end residuals Options AR=number of autoregressive parameters [0] MA=number of moving average parameters [0] iters= number of iterations SAR=number of seasonal autoregressive parameters [0] SMA=number of seasonal moving average parameters [0] DIFFS=number of regular differencings [0] SDIFFS=number of seasonal differencings [0] CONSTANT/[NOCONSTANT]

Technical Issues Constant in the equation box(constant, ar=||1,4||, ma = 2) y Negative values of the aic and bic aic = T ln(%rss) + 2*%nobs To use the aic and bic, the models must be estimated over the same sample period. box(constant, ar=||1,4||, ma = 2) dly 90:1 * box(constant, ar=1, ma = 2) dly 90:1 *

Technical Issues 2 Did not converge error message The program cannot find the solution for the coefficients that minimizes the residual sum of squares. increase iters iters=50 The model is too complex (too unnecessary many parameters)

Transforming the series When to difference? When to use the log? Graph the transformed series Check ACF of the transformed series

The ACF Label the graph of the autocorrelations Alter bjident.src Write in the essential details plot the correlations yourself ACF of the residuals

series start end Options DIFF=maximum regular differencings[0] SDIFFS=maximum seasonal differencings[0] TRANS=[NONE]/LOG/ROOT Transformation to apply to data [GRAPH]/NOGRAPH SPAN=seasonal span

Forecast forecast(print) number steps start # equation forecasts number The number of equations in the system. In univariate forecasting, number is necessarily equal to 1. stepsThe number of forecasts to create. startThe starting period of the forecasts. equationThe name of the previously defined equation. forecastsThe name of the series in which you want to save the forecasts. This field is optional. Example boxjenk(define=eq1,ar=1,ma=1) y / resids forecast(print) # eq1

Forecast -- New FORECAST equations # equation forecasts FROM =starting period of the forecast interval TO =ending period of the forecast interval STEPS =number of forecast steps to compute FROM and TO set the starting and ending periods for the forecasts, or FROM and STEPS to set the starting date and number of steps (periods) PRINT/[NOPRINT]

Seasonality in the Box-Jenkins framework Seasonal AR coefficients y t = a 1 y t-1 +a 12 y t-12 + a 13 y t-13 y t = a 1 y t-1 +a 12 y t-12 + a 1 a 12 y t-13 (1 - a 1 L)(1 – a 12 L 12 )y t Seasonal MA Coefficients Seasonal differencing: = y t – y t-12

Seasonality in the Box-Jenkins framework Seasonal AR coefficients y t = a 1 y t-1 +a 12 y t-12 + a 13 y t-13 y t = a 1 y t-1 +a 12 y t-12 + a 1 a 12 y t-13 (1 - a 1 L)(1 – a 12 L 12 )y t Seasonal MA Coefficients Seasonal differencing:  y t = y t – y t-1 versus   y t = y t – y t-12 NOTE: You do not difference 12 times dif(sdiffs=1) y / sdy