Autocorrelation and the AR(1) Process

Similar documents
R t. C t P t. + u t. C t = αp t + βr t + v t. + β + w t

Econ Autocorrelation. Sanjaya DeSilva

Regression with Time Series Data

Generalized Least Squares

Distribution of Least Squares

Stationary Time Series

Wisconsin Unemployment Rate Forecast Revisited

Licenciatura de ADE y Licenciatura conjunta Derecho y ADE. Hoja de ejercicios 2 PARTE A

GMM - Generalized Method of Moments

Dynamic Models, Autocorrelation and Forecasting

Distribution of Estimates

Vectorautoregressive Model and Cointegration Analysis. Time Series Analysis Dr. Sevtap Kestel 1

(10) (a) Derive and plot the spectrum of y. Discuss how the seasonality in the process is evident in spectrum.

Properties of Autocorrelated Processes Economics 30331

Comparing Means: t-tests for One Sample & Two Related Samples

Modeling and Forecasting Volatility Autoregressive Conditional Heteroskedasticity Models. Economic Forecasting Anthony Tay Slide 1

Cointegration and Implications for Forecasting

1. Diagnostic (Misspeci cation) Tests: Testing the Assumptions

Outline. lse-logo. Outline. Outline. 1 Wald Test. 2 The Likelihood Ratio Test. 3 Lagrange Multiplier Tests

ACE 562 Fall Lecture 8: The Simple Linear Regression Model: R 2, Reporting the Results and Prediction. by Professor Scott H.

ACE 562 Fall Lecture 5: The Simple Linear Regression Model: Sampling Properties of the Least Squares Estimators. by Professor Scott H.

Wednesday, November 7 Handout: Heteroskedasticity

Measurement Error 1: Consequences Page 1. Definitions. For two variables, X and Y, the following hold: Expectation, or Mean, of X.

Lecture 5. Time series: ECM. Bernardina Algieri Department Economics, Statistics and Finance

Detecting Structural Change and Testing for the Stability of Structural Coefficients

Solutions: Wednesday, November 14

Forecasting optimally

Chapter 5. Heterocedastic Models. Introduction to time series (2008) 1

Chapter 16. Regression with Time Series Data

Diebold, Chapter 7. Francis X. Diebold, Elements of Forecasting, 4th Edition (Mason, Ohio: Cengage Learning, 2006). Chapter 7. Characterizing Cycles

The Overlapping Data Problem

Testing the Random Walk Model. i.i.d. ( ) r

Robust estimation based on the first- and third-moment restrictions of the power transformation model

ACE 564 Spring Lecture 7. Extensions of The Multiple Regression Model: Dummy Independent Variables. by Professor Scott H.

Dynamic Econometric Models: Y t = + 0 X t + 1 X t X t k X t-k + e t. A. Autoregressive Model:

ECON 482 / WH Hong Time Series Data Analysis 1. The Nature of Time Series Data. Example of time series data (inflation and unemployment rates)

14 Autoregressive Moving Average Models

ACE 562 Fall Lecture 4: Simple Linear Regression Model: Specification and Estimation. by Professor Scott H. Irwin

Bias in Conditional and Unconditional Fixed Effects Logit Estimation: a Correction * Tom Coupé

The Simple Linear Regression Model: Reporting the Results and Choosing the Functional Form

Kriging Models Predicting Atrazine Concentrations in Surface Water Draining Agricultural Watersheds

DEPARTMENT OF STATISTICS

Financial Econometrics Jeffrey R. Russell Midterm Winter 2009 SOLUTIONS

Time series Decomposition method

OBJECTIVES OF TIME SERIES ANALYSIS

Økonomisk Kandidateksamen 2005(II) Econometrics 2. Solution

How to Deal with Structural Breaks in Practical Cointegration Analysis

CHAPTER 17: DYNAMIC ECONOMETRIC MODELS: AUTOREGRESSIVE AND DISTRIBUTED-LAG MODELS

Applied Time Series Notes White noise: e t mean 0, variance 5 2 uncorrelated Moving Average

5. NONLINEAR MODELS [1] Nonlinear (NL) Regression Models

State-Space Models. Initialization, Estimation and Smoothing of the Kalman Filter

GDP Advance Estimate, 2016Q4

4.1 Other Interpretations of Ridge Regression

( ) ln ( ) is a new random error term. Mathematically, the vt. behave according to

Estimation Uncertainty

Lecture 10 Estimating Nonlinear Regression Models

Lecture 15. Dummy variables, continued

Solutions to Exercises in Chapter 12

Testing for a Single Factor Model in the Multivariate State Space Framework

A Specification Test for Linear Dynamic Stochastic General Equilibrium Models

The Effect of Nonzero Autocorrelation Coefficients on the Distributions of Durbin-Watson Test Estimator: Three Autoregressive Models

Solutions to Odd Number Exercises in Chapter 6

Unit Root Time Series. Univariate random walk

Introduction D P. r = constant discount rate, g = Gordon Model (1962): constant dividend growth rate.

Econ107 Applied Econometrics Topic 7: Multicollinearity (Studenmund, Chapter 8)

Chapter 11. Heteroskedasticity The Nature of Heteroskedasticity. In Chapter 3 we introduced the linear model (11.1.1)

Hypothesis Testing in the Classical Normal Linear Regression Model. 1. Components of Hypothesis Tests

STAD57 Time Series Analysis. Lecture 5

References are appeared in the last slide. Last update: (1393/08/19)

Computer Simulates the Effect of Internal Restriction on Residuals in Linear Regression Model with First-order Autoregressive Procedures

Innova Junior College H2 Mathematics JC2 Preliminary Examinations Paper 2 Solutions 0 (*)

Methodology. -ratios are biased and that the appropriate critical values have to be increased by an amount. that depends on the sample size.

The Multiple Regression Model: Hypothesis Tests and the Use of Nonsample Information

Autocorrelation or Serial Correlation

ESTIMATION OF DYNAMIC PANEL DATA MODELS WHEN REGRESSION COEFFICIENTS AND INDIVIDUAL EFFECTS ARE TIME-VARYING

1. Joint stationarity and long run effects in a simple ADL(1,1) Suppose Xt, Y, also is stationary?

Vehicle Arrival Models : Headway

CH Sean Han QF, NTHU, Taiwan BFS2010. (Joint work with T.-Y. Chen and W.-H. Liu)

(a) Set up the least squares estimation procedure for this problem, which will consist in minimizing the sum of squared residuals. 2 t.

Chapter 15. Time Series: Descriptive Analyses, Models, and Forecasting

Choice of Spectral Density Estimator in Ng-Perron Test: A Comparative Analysis

Nature Neuroscience: doi: /nn Supplementary Figure 1. Spike-count autocorrelations in time.

Department of Economics East Carolina University Greenville, NC Phone: Fax:

12: AUTOREGRESSIVE AND MOVING AVERAGE PROCESSES IN DISCRETE TIME. Σ j =

Wednesday, December 5 Handout: Panel Data and Unobservable Variables

Stability. Coefficients may change over time. Evolution of the economy Policy changes

Section 4 NABE ASTEF 232

L07. KALMAN FILTERING FOR NON-LINEAR SYSTEMS. NA568 Mobile Robotics: Methods & Algorithms

J. Martin van Zyl Department of Mathematical Statistics and Actuarial Science, University of the Free State, PO Box 339, Bloemfontein, South Africa

y = β 1 + β 2 x (11.1.1)

A New Unit Root Test against Asymmetric ESTAR Nonlinearity with Smooth Breaks

Ensamble methods: Bagging and Boosting

Box-Jenkins Modelling of Nigerian Stock Prices Data

Robust critical values for unit root tests for series with conditional heteroscedasticity errors: An application of the simple NoVaS transformation

A Hybrid Model for Improving. Malaysian Gold Forecast Accuracy

Nonstationarity-Integrated Models. Time Series Analysis Dr. Sevtap Kestel 1

- The whole joint distribution is independent of the date at which it is measured and depends only on the lag.

Monetary policymaking and inflation expectations: The experience of Latin America

ECON2228 Notes 10. Christopher F Baum. Boston College Economics. cfb (BC Econ) ECON2228 Notes / 48

Components Model. Remember that we said that it was useful to think about the components representation

Transcription:

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 1 Auocorrelaion and he AR(1) Process Hun Myoung Park This documen discusses auocorrelaion (or serial correlaion) in linear regression models wih focus on he firs-order auoregression process, AR(1). This documen is largely based on Greene (003). 1. Defining Auocorrelaion Auocorrelaion occurs in ime-series daa more ofen han in cross-secional daa. Auocorrelaion (or auoregressiion and serial correlaion) is a resul of he violaion of he nonauocorrelaion assumpion ha each disurbance is uncorrelaed wih every oher disurbance 1.1 Saionariy and Auocorrelaion In he presence of auocorrelaion, E( ε X ) = E( ε X ) = 0 s Var( ε X ) = Var( ε s X ) = σ, bu Cov( ε, X ) = 0 for all s. ε s The disribuion of disurbances is said o be covariance saionary or weekly saionary. 1 E( ε ' ε ) σ I, bu = E ( ε ' ε ) σ Ω ha is a full, posiive definie marix wih a consan σ on he diagonal. Since Ωs is a funcion of -s, bu no of or s alone (saionary assumpion), he covariance beween observaions and s is also a finie funcion of -s, he disance apar in ime of he observaions. The auocovariances is defined as Cov ( ε, ε s X ) = Cov( ε + s, ε X ) = γ s = σ Ω, s = σ Ω + s, s and σ Ω = γ = σ Auocorrelaion is he correlaion beween ε and ε s, Cov( ε, ε s X ) γ s Corr( ε, ε s X ) = = = ρs Var( ε X ) Var( ε X ) γ 1. Auoregression and AR(p) s 0, 0 A ypical auoregression model AR(p) is y = μ + φ1 y 1 + φ y... + φ p y p + ε or 1 Srong saionariy requires ha whole join disribuion is he same over he ime periods.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 1 p 1 B φb... φ p B y = μ ε or simply φ B) y = μ + ε (1 φ ) + backward shif operaor. (, where B denoes he The firs-order auoregression AR(1) process is srucured so ha he influence of a given disurbance fades as i recedes ino he more disan pas bu vanishes only asympoically. y μ + φ + ε = 1 y 1 = + φ1 u + φ1 y + ε 1 ) + ε = μ + φ1u + φ1 y + φ1ε 1 ε = ρε 1 + u y μ ( + ε Alernaively, In conras, he firs-order moving-average MA(1) process has a shor memory, ε = u λu 1. Ineresingly, AR(1) can be wrien in MA( ) form, ε ρε + u, where E ( ) = 0, = 1 E( u ) = σ u, and Cov ( u, u s ) = 0 if s. Repeaed subsiuion ends up wih ε = u + ρu 1 + ρ u... Each disurbance embodies he enire pas hisory of us, wih he mos recen observaions receiving greaer weigh han hose in he disan pas. The variance and covariance of disurbances are 4 σ u Var( ε ) = σ u + ρ σ u + ρ σ u +... = = σ ε 1 ρ Cov( ε, ε 1) = E( ε, ε 1) = E( ε 1, ρε 1 + u ) = ρvar( ε ρσ u ) = 1 ρ 1. Causes and Consequences of Auocorrelaion Auocorrelaion may resul from a problem in (linear) funcional form assumpion, omied relevan explanaory variables (ofen lagged dependen variables), or measuremen errors ha could be auocorrelaed. In pracice, he specificaion errors (ignoring relevan variables) appear o be mos criical. Like heeroscedasiciy, auocorrelaion makes esimaed variances of OLS (ordinary leas squares) parameer esimaes asympoically inefficien. Technically speaking, σ is biased (underesimaed). However, OLS parameer esimaes hemselves remain unbiased and consisen. In shor, OLS is no BLUE. 3. Deecing Auocorrelaion This secion considers several es saisics including Breusch-Godfrey LM, Box-Pierce Q, Ljung-Box Q, Durbin-Wason d, and Durbin h. 3.1 Lagrange Muliplier Tes for AR(p) u

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 3 Breusch (1978) and Godfrey (1978) develop a Lagrange muliplier es ha can be applied o he ph order auoregression models. Thus, his es is more general han D-W d and Durbin h. The null hypohesis is a model wihou lagged dependen variables, ρ ρ =... = ρ 0. 1 = p = The LM es consiss of several seps. Firs, regress Y on Xs o ge residuals. Compue lagged residuals up o ph order. Replace missing values for lagged residuals wih zeros. Regress ε on Xs and e -1, e -, and e -p o ge R. Finally compue LM saisic using he R and he number of observaions T used in he model. 3 LM = TR ~ χ ( p) This saisic follows he chi-squared disribuion wih p degrees of freedom. This Breusch- Godfrey LM is preferred o oher es saisics. 3. Q and Q Tes for AR(p) Box and Pierce (1970) develop he Q es ha is asympoically equivalen o he Breusch- Godfrey LM es. Box-Pierce Q has a chi-squared disribuion wih p degrees of freedom. The Q saisic is Q = T P j = 1 r j ~ χ ( p), where r T = p+ 1 p = T = 1 e e e p Firs, regress Y on Xs o ge residuals and compue lagged residuals up o ph order. Compue individual rp s using e and ee p. Finally, plug rp s in he formula o compue Box-Pierce Q. Ljung and Box (1979) refine he Box-Pierce Q es o ge Q. You may use informaion obained above. Ljung-Box Q also follows he chi-squared disribuion wih p degrees of freedom. r Q' = T ( T + ) ~ χ ( p). j P j j = 1 T 3.3 Durbin-Wason d for AR(1) The Durbin-Wason (D-W) es is based on he principle ha if he rue disurbances are auocorrelaed, his fac will be revealed hrough he auocorrelaions of he leas squares residuals (Durbin and Wason 1950, 1951, 1971). The null hypohesis is ha disurbances are no auocorrelaed, ρ = 0. The es saisic is This model is viewed as a resriced model, whereas he full or unresriced model has p lagged dependen variables. 3 Since missing values in lagged residuals are filled wih zero, he number of observaions used in he model is he same as ha in he original model.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 4 d T = = T ( e e 1) = 1 e From he Durbin-Wason saisic able (T and k), we ge he following decision crieria. 4 0 d * d d L U U * d 4 L Rejec H 0 Inconclusive Do no rejec H 0 Inconclusive Rejec H 0 ρ > 0 (uncerain) H 0 : ρ = 0 (uncerain) ρ < 0 D-W d ranges from zero (perfec posiive auocorrelaion) o 4 (perfec negaive auocorrelaion). Noe ha here are wo inconclusive areas where he null hypohesis canno be esed properly. The upper and lower limis reflec ha he sequence of disurbances depends no only on he sequence of residuals bu also on he sequence of values of independen variables (Derick Boyd s memo). The presence of inconclusive regions, which will large in a small sample, implies shorcomings in pracice (Greene 003). The relaionship beween D-W d and auocorrelaion coefficien is known as e1 + et DW = (1 r) T e = 1 When he sample is large, he las erm above will be negligible. Thus, DW (1 ˆ ρ) or ˆ ρ 1 DW The Durbin-Wason es has been found o be quie powerful when compared wih ohers for AR(1) processes. However, he es is no likely o be valid when here is a lagged dependen variable in he equaion (Greene 003). 3.4 Durbin h for AR(1) wih a Lagged Dependen Variable D-W d is ofen biased oward a finding of no auocorrelaion (DW=) (Greene 003). Durbin (1970) proposes a Lagrange muliplier saisic o es auocorrelaion in he presence of a lagged dependen variable. D-W d and Durbin h are known as asympoically equivalen. T d T h r 1 =, where Ts lag < 1. 1 Tslag 1 Tslag T is he number of observaions used in he model wih a lagged dependen variable. Compared o D-W d, Durbin h loses one observaion in compuaion. slag is he esimaed variance of he OLS coefficien of he lagged dependen variable Y -1. Simply, his variance is he squared 4 k is he number of regressors excluding he inercep.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 5 s lag is also an elemen in he diagonal of he variance- sandard error of he parameer esimaor. covariance marix. The h saisic is approximaely normally disribued wih zero mean and uni variance. Noe ha his h es is he one-ailed es. 3.5 Sofware Issue The Table 3.1 summarizes procedures and commands ha conduc AR(1) es. STATA.durbina command produces a chi-squared saisic, which is differen from he z score. Table 3.1 Comparison of Compuing Tes Saisics SAS 9.3 STATA 9. LIMDEP 8.0 B-G LM AUTOREG /GODFREY=1.bgodfrey,lags(p) - D-W d REG /DW AUTOREG /DW=1.dwsa (.esa dwason) Regress D-W h AUTOREG /LAGDV= DW=1.durbina (.esa durbinal) - B-P Q - - - L-B Q - - - * Box-Pierce Q and Ljung-Box Q are no suppored by saisical sofware. 4. Correcing Auocorrelaion The auoregressive error model correcs auocorrelaion. If Ω is known, you may ake he generalized leas squares (GLS) mehod. Oherwise, you have o esimae he feasible generalized leas squares (FGLS). If an auoregressive error model also suffers from heeroscedasiciy, you may ry he generalized auoregressive condiional heeroscedasiciy (GARCH) model. 4.1 Generalized Leas Squares If Ω is known, he generalized leas squares esimaor is ˆ 1 1 β = ( X ' Ω X ) X ' Ω 1 1 consisen. The variance of parameer esimaes is Var( ˆ) β = σ ( X ' Ω X ). ε 1 y, which is GLS needs ransformaion of dependen variable, independen variables, and he inercep. See he following. 1 ρ 0... 0 Since ρ 1... 0 1 ρ P = in AR(1),............ 0... ρ 1 1 ρ y 1 1 ρ 1 ρ x 11... 1 ρ xk1 * y ρy1 Y = *, 1 ρ x1 ρx11... xk ρxk1 X =............... y T ρy T 1 1 ρ x1, T ρx1, T 1... xk, T ρxk, T 1

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 6 Then, regress Y * on X *. In SAS and STATA, he inercep should be suppressed. 4. Feasible Generalized Leas Squares In he real world Ω is ofen unknown. So he feasible generalized leas squares (FGLS) seems o be more plausible han GLS. FGLS begins wih esimaing ρ. The following mehods are commonly used. r 1 T = e e 1 = e r1 1 DW Theil s (1971) adjused esimaor r adj r *( T K) /( T 1). 1 Once you compue r, again perform daa ransformaion. Do no forge o ransform he inercep erm. The Prais-Winsen (1954) and Cochrane-Orcu (1949) FGLS can be boh wo-sepped and ieraive. The Prais-Winsen esimaor uses all observaions, while he Cochrane-Orcu FGLS ignores he firs observaion. The Prais-Winsen FGLS is ofen called he Yule-Walker mehod in SAS (METHOD=YW). You may ierae he procedure o ge more saisfacory oupus. SAS provides wo-sep, ieraive wo-sep, and maximum likelihood mehods, while STATA suppors he firs wo mehods. Insead, STATA allows researchers o use various ρ esimaors. In addiion o wo-sep, ieraive wo-sep, and maximum likelihood mehods, LIMDEP suppors he Haanaka s (1974) model for auocorrelaion wih a lagged dependen variable, which is asympoically equivalen o he maximum likelihood model. 4.3 Sofware Issue The Table 4.1 summarizes esimaion mehods suppored in each saisical sofware. Table 4.1 Comparison Esimaion Mehods SAS 9.3 STATA 9. LIMDEP 8.0 OLS REG.regress Regress -sep P-W AUTOREG /YW.prais, wosep Regress;AR1;Maxi=1;Rho= -sep C-O -.prais, corc wosep Regress;AR1;Maxi=1;Alg=C;Rho= -sep P-W (dw) -.prais, rhoype(dw) wosep Regress;AR1;Maxi=1 -sep C-O (dw) -.prais, rho(dw) corc wosep Regress;AR1;Alg=Corc;Maxi=1 Ieraive P-W AUTOREG /ITYW.prais Regress;AR1; Ieraive C-O -.prais, corc Regress;AR1;Alg=Corc MLE AUTOREG /ML - Regress;AR1;Alg=MLE Two-sage (IV) - - SLS;Ins;AR1;Haanaka GARCH AUTOREG /GARCH.arch, garch(p) Regress;Model=Garch(p,q,1) * The defaul ypes of rho are auocorrelaion coefficien in SAS, residual regression-based rho in STATA, and he D-W d-based rho in LIMDEP.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 7 5. Example: Deecing Auocorrelaion This secion illusraes how o deec auocorrelaion using STATA and SAS. 5.1 STATA STATA has he.dwsa command for D-W d and.durbina for he Durbin h saisic. These commands are posesimaion commands of he.regress. The.durbina produces a chisquared saisic insead of a z score and reurns a slighly differen p-value. 5.1.1 Daa Preparaion The daa are downloaded from Greene s webpage a hp://pages.sern.nyu.edu/~wgreene. This daa se for he U.S. Gasoline Marke, 1960-1995, is drawn from he Economic Repor of he Presiden: 1996, Council of Economic Advisors, 1996. The variables included are G = Toal U.S. gasoline consumpion, compued as oal expendiure divided by price index. Pg = Price index for gasoline, Y = Per capia disposable income, Pnc = Price index for new cars, Puc = Price index for used cars, Pp = Price index for public ransporaion, Pd = Aggregae price index for consumer durables, Pn = Aggregae price index for consumer nondurables, Ps = Aggregae price index for consumer services, Pop = U.S. oal populaion in millions.. infile Year G Pg Y Pnc Puc Pp Pd Pn Ps Pop /// using hp://pages.sern.nyu.edu/~wgreene/tex/ables/tablef-.x, clear. drop if Year==.. sse Year ime variable: Year, 1960 o 1995. gen lng=ln(g/pop). gen lnpg=ln(pg). gen lni=ln(y). gen lnpnc=ln(pnc). gen lnpuc=ln(puc). sum ln* Variable Obs Mean Sd. Dev. Min Max -------------+-------------------------------------------------------- lng 36 -.0037086.1516908 -.335819.16097 lnpg 36.6740943.6048 -.089947 1.41318 lni 36 9.11098.048051 8.705497 9.387147 lnpnc 36.443198.3794 -.0090407 1.03496 lnpuc 36.66361.6301064 -.179166 1.65363. global OLS "lng lnpg lni" // OLS. global OLS "lng l1.lng lnpg lni" // OLS for Durbin h. global K=5

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 8. regress $OLS Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 176.71 Model.771516959 4.198794 Prob > F = 0.0000 Residual.033836907 31.001091513 R-squared = 0.9580 -------------+------------------------------ Adj R-squared = 0.956 Toal.805353866 35.0301011 Roo MSE =.03304 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.0590955.034849-1.8 0.079 -.15349.007158 lni 1.3734.075677 18.16 0.000 1.19156 1.57643 lnpnc -.167969.169934-1.00 0.36 -.3858017.13079 lnpuc -.118708.0813371-1.46 0.154 -.84596.0471799 _cons -1.34184.6748946-18.9 0.000-13.7183-10.96539. predic e, residuals. gen e_=e^. gen ee1=e*l.e. gen e1_=l.e^. gen e_e1_=(e-l.e)^. lis e l.e e_ ee1 e1_ e_e1_ in 1/5 +-------------------------------------------------------------------+ e L.e e_ ee1 e1_ e_e1_ ------------------------------------------------------------------- 1..033815..0011435.....0160893.033815.000589.0005441.0011435.000314 3..019306.0160893.000377.0003106.000589.0000103 4..0146887.019306.000158.000836.000377.000013 5. -.0187137.0146887.000350 -.000749.000158.0011157 +-------------------------------------------------------------------+. absa e e_ ee1 e1_ e_e1_, sa(n sum mean) save sas e e_ ee1 e1_ e_e1_ ---------+-------------------------------------------------- N 36 36 35 35 35 sum -3.73e-09.0338369.08194.0334066.00461 mean -1.03e-10.0009399.00065.0009545.0005846 ------------------------------------------------------------. marix sum=r(satoal). local s_e_ = sum[,] //.03383691. local s_ee1 = sum[,3] //.081944. local s_e1_ = sum[,4] //.03340659. local s_e_e1_ = sum[,5] //.0046115. global T = sum[1,1] //36 5.1. Breusch-Godfrey LM Tes Unlike he Durbin-Wason d es, he Breusch-Godfrey Lagrange muliplier es can be applied o general AR(p) processes. The STATA.bgodfrey, a posesimaion command, compues he saisic up o he ph order. Compare he four LM saisics wih hose in 5.... quiely regress $OLS (oupu is skipped). bgodfrey,lags(1) Breusch-Godfrey LM es for auocorrelaion --------------------------------------------------------------------------- lags(p) chi df Prob > chi

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 9 -------------+------------------------------------------------------------- 1 16.835 1 0.0000 --------------------------------------------------------------------------- H0: no serial correlaion. bgodfrey,lags() Breusch-Godfrey LM es for auocorrelaion --------------------------------------------------------------------------- lags(p) chi df Prob > chi -------------+------------------------------------------------------------- 0.85 0.0000 --------------------------------------------------------------------------- H0: no serial correlaion. bgodfrey,lags(3) Breusch-Godfrey LM es for auocorrelaion --------------------------------------------------------------------------- lags(p) chi df Prob > chi -------------+------------------------------------------------------------- 3 0.994 3 0.0001 --------------------------------------------------------------------------- H0: no serial correlaion. bgodfrey,lags($lag) // equivalen o.esa bgodfrey,lags() Breusch-Godfrey LM es for auocorrelaion --------------------------------------------------------------------------- lags(p) chi df Prob > chi -------------+------------------------------------------------------------- 4 1.536 4 0.000 --------------------------------------------------------------------------- H0: no serial correlaion In order o manually compue he LM saisic, creae p lagged residuals and regress residuals on all independen variables and all lagged residuals. Do no forge o fill missing in he lagged residuals wih zero.. gen e1=l1.e. replace e1=0 if e1==. Now run he OLS o ge R.. regress e lnpg lni e1 Source SS df MS Number of obs = 36 -------------+------------------------------ F( 3, 3) = 9. Model.015685468 3.0058489 Prob > F = 0.000 Residual.018151439 3.0005673 R-squared = 0.4636 -------------+------------------------------ Adj R-squared = 0.4133 Toal.033836907 35.000966769 Roo MSE =.038 e Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.0055195.0156354-0.35 0.76 -.0373678.06389 lni.010863.0460709 0.4 0.815 -.089801.1047065 e1.6873731.1307147 5.6 0.000.41116.9536301 _cons -.0956494.410647-0.3 0.817 -.931331.740034 The LM saisic is T*R, which follows a chi-squared disribuion wih p degrees of freedom.. local r=e(r). local lm = ($T)*`r'. disp `lm' // LM saisic

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 10 16.688194. disp chiail(1, `lm') // p-value.00004405 5.1.3 Q and Q Tes Now, consider Box-Pierce Q and Ljung-Box Q saisics. Firs compue individual auocorrelaion coefficiens up o he ph order.. regress lnpg lni lnpnc lnpuc e1 // for AR(1) Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 88.47 Model 11.749017 4.9375431 Prob > F = 0.0000 Residual 1.091855 31.03319954 R-squared = 0.9195 -------------+------------------------------ Adj R-squared = 0.9091 Toal 1.77805 35.365091499 Roo MSE =.181 lnpg Coef. Sd. Err. P> [95% Conf. Inerval] lni.57934.4061863 1.30 0.03 -.3004899 1.356355 lnpnc.95463.6809687 1.40 0.17 -.4364186.34171 lnpuc.186664.449159 0.41 0.681 -.79787 1.103 e1.3949087 1.001913 0.39 0.696-1.648507.43834 _cons -4.681809 3.66033-1.9 0.06-1.07715.713534. gen ee=e^. gen ee1=e*e1. absa ee ee1, sa(n sum mean) save // for AR(1) sas ee ee1 ---------+-------------------- N 36 36 sum.0338369.08194 mean.0009399.0006339 ------------------------------. marix sum=r(satoal). local r1=sum[,]/sum[,1]. local Q = $T*(`r1'^) // for AR(1). disp `Q' 16.373108. disp chiail(1,`q') // for AR(1).000050. local Q1 = $T*($T+)*(`r1'^/($T-1)) // for AR(1). disp `Q1' 17.776517. disp chiail(1,`q1') // for AR(1).0000484 AS and STATA do no have opion or command o compue Q or Q. 5.1.4 Durbin-Wason d Tes

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 11 Firs, le us compue D-W d manually o make sure i is idenical o he saisic provided by STATA. Noe ha.dwsa and.esa dwason are equivalen.. local dw= `s_e_e1_'/`s_e_' //.60469933. dwsa // equivalen o.esa dwason Durbin-Wason d-saisic( 5, 36) =.6046993. local rho=1-`dw'/ // DW based rho: rhoype(dw).69765033. local rho=`s_ee1'/`s_e_' // Auocorrelaion rho: rhoype(scorr).67439496 5.1.5 Durbin h Tes Finally, le us compue he Durbin h for a model wih a lagged dependen variable. Noe ha Durbin h is no a wo-ailed es, bu a one-ailed es.. regress $OLS Source SS df MS Number of obs = 35 -------------+------------------------------ F( 5, 9) = 76.54 Model.680487618 5.13609754 Prob > F = 0.0000 Residual.0147173 9.00049144 R-squared = 0.9795 -------------+------------------------------ Adj R-squared = 0.9759 Toal.694759791 34.0043411 Roo MSE =.018 lng Coef. Sd. Err. P> [95% Conf. Inerval] lng L1..6877655.113904 6.04 0.000.454805.90757 lnpg -.093941.05678-4.16 0.000 -.1400975 -.047785 lni.43104.169678.55 0.016.085089.7774119 lnpnc -.909653.097684-3.14 0.004 -.4806981 -.10135 lnpuc.1737385.0717074.4 0.0.070803.303967 _cons -3.844963 1.54568 -.5 0.017-6.963055 -.768714. marix lis e(v) symmeric e(v)[6,6] L. lng lnpg lni lnpnc lnpuc _cons L.lnG.0197417 lnpg -.0006595.0005093 lni -.0183065.00067796.0865159 lnpnc -.0019999 -.00036491.0033396.00860598 lnpuc.00496849 -.00033304 -.00791344 -.00550537.00514196 _cons.16504766 -.00614887 -.5805664 -.0303574.071457.343077. marix V = e(v). local v_lag = V[1,1] // variance of coefficien of he lagged DV. predic e, residuals. gen e_=e^. gen ee1=e*l.e. lis e l.e e_ ee1 in 1/5 +----------------------------------------------+ e L.e e_ ee1 ---------------------------------------------- 1.......0065173..000045. 3..0107834.0065173.0001163.0000703 4. -.0018847.0107834 3.55e-06 -.000003

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 1 5. -.01078 -.0018847.0001056.0000194 +----------------------------------------------+. absa e e_ ee1, sa(n sum mean) save sas e e_ ee1 ---------+------------------------------ N 35 35 34 sum -1.86e-09.0147.0017067 mean -5.3e-11.0004078.000050 ----------------------------------------. marix sum=r(satoal). local s_e_ = sum[,] //.0147. local s_ee1 = sum[,3] //.0017067. global T = sum[1,1] // 35. local rho=`s_ee1'/`s_e_' // Auocorrelaion rho: rhoype(scorr). disp `rho'.1195851. disp $T*`v_lag' // o check if Ts < 1.4540958. local h = `rho'*sqr($t/(1-$t*`v_lag')). disp `h'.95753197. disp 1-norm(`h').16914941 SAS AUTOREG procedure reurns he same Durbin h.9575 (See 5..). Using he alernaive erm ˆ ρ 1 DW will give you a quie differen saisic largely because his sample is no large sufficienly.. dwsa // equivalen o esa dwason Durbin-Wason d-saisic( 6, 35) = 1.743835. marix dw = r(dw). local dw = dw[1,1] // dw. local h = (1-`dw'/)*sqr($T/(1-$T*`v_lag')). disp `h' 1.055711. disp 1-norm(`h').1554689 Le us run eiher.durbina or.esa durbinal o conduc he Durbin s alernaive es, which produces a chi-squared saisic whose p-value is differen from ha of h above.. durbina // equivalen o.esa durbinal Durbin's alernaive es for auocorrelaion --------------------------------------------------------------------------- lags(p) chi df Prob > chi -------------+------------------------------------------------------------- 1 0.660 1 0.4164 --------------------------------------------------------------------------- H0: no serial correlaion 5. SAS REG and AUTOREG Procedure

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 13 In SAS, you may use he REG procedure of SAS/STAT and he AUTOREG procedure of SAS/ETS. REG compues he D-W d saisic, while AUTORE produces boh D-W d and Durbin h saisics. 5..1 SAS REG Procedure The /DW opion in he REG procedure compues he D-W d saisic. PROC REG DATA=masil.gasoline; MODEL lng = lnpg lni lnpnc lnpuc /DW; RUN; The REG Procedure Model: MODEL1 Dependen Variable: lng Number of Observaions Read 36 Number of Observaions Used 36 Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 4 0.7715 0.1988 176.71 <.0001 Error 31 0.03384 0.00109 Correced Toal 35 0.80535 Roo MSE 0.03304 R-Square 0.9580 Dependen Mean -0.00371 Adj R-Sq 0.956 Coeff Var -890.84804 Parameer Esimaes Parameer Sandard Variable DF Esimae Error Value Pr > Inercep 1-1.34184 0.67489-18.9 <.0001 lnpg 1-0.05910 0.0348-1.8 0.0786 lni 1 1.37340 0.07563 18.16 <.0001 lnpnc 1-0.1680 0.1699-1.00 0.358 lnpuc 1-0.11871 0.08134-1.46 0.1545 Durbin-Wason D 0.605 Number of Observaions 36 1s Order Auocorrelaion 0.674 The firs order auocorrelaion in he REG procedure is compued using ee 1 and for he compuaion in he STATA. 5.. SAS AUTOREG Procedure e See 5.1. The AUTOREG procedure conducs D-W d and Breusch-Godfrey LM ess. You may specify he order in he DW= and GODFREY= opions. For example, he GODFREY=4 produces LM saisics up o 4 h order auoregression.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 14 PROC AUTOREG DATA=masil.gasoline; MODEL lng = lnpg lni lnpnc lnpuc /DW=1 GODFREY=4 ; RUN; The AUTOREG Procedure Dependen Variable lng Ordinary Leas Squares Esimaes SSE 0.03383691 DFE 31 MSE 0.00109 Roo MSE 0.03304 SBC -130.8883 AIC -138.7464 Regress R-Square 0.9580 Toal R-Square 0.9580 Durbin-Wason 0.6047 Godfrey's Serial Correlaion Tes Alernaive LM Pr > LM AR(1) 16.8353 <.0001 AR() 0.847 <.0001 AR(3) 0.994 0.0001 AR(4) 1.5360 0.000 Sandard Approx Variable DF Esimae Error Value Pr > Inercep 1-1.3418 0.6749-18.9 <.0001 lnpg 1-0.0591 0.035-1.8 0.0786 lni 1 1.3734 0.0756 18.16 <.0001 lnpnc 1-0.168 0.170-1.00 0.358 lnpuc 1-0.1187 0.0813-1.46 0.1545 The AUTOREG procedure also compue Durbin h saisics wih he /LAGDV and DW opions. The /COVB opion reurns he variance and covariance marix of parameer esimaes. The variance of he coefficien of he lagged dependen variable is 0.01974=.1139^. PROC AUTOREG DATA=masil.gasoline; MODEL lng = lng1 lnpg lni lnpnc lnpuc /LAGDV=lnG1 DW=1 DWPROB COVB; RUN; The AUTOREG Procedure Dependen Variable lng Ordinary Leas Squares Esimaes SSE 0.014717 DFE 9 MSE 0.000491 Roo MSE 0.018 SBC -15.5099 AIC -161.8401 Regress R-Square 0.9795 Toal R-Square 0.9795 Durbin h 0.9575 Pr > h 0.1691 Durbin-Wason 1.7438 Sandard Approx Variable DF Esimae Error Value Pr > Inercep 1-3.8450 1.546 -.5 0.0174

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 15 lng1 1 0.6878 0.1139 6.04 <.0001 lnpg 1-0.0939 0.06-4.16 0.0003 lni 1 0.431 0.1693.55 0.0164 lnpnc 1-0.910 0.098-3.14 0.0039 lnpuc 1 0.1737 0.0717.4 0.019 Covariance of Parameer Esimaes Inercep lng1 lnpg lni lnpnc lnpuc Inercep.343077 0.1650477-0.006149-0.58057-0.030353 0.071453 lng1 0.1650477 0.01974-0.000659-0.018307-0.00 0.0049685 lnpg -0.006149-0.000659 0.0005093 0.000678-0.000365-0.000333 lni -0.58057-0.018307 0.000678 0.086516 0.0033396-0.007913 lnpnc -0.030353-0.00-0.000365 0.0033396 0.008606-0.005505 lnpuc 0.071453 0.0049685-0.000333-0.007913-0.005505 0.00514 The AUTOREG procedure esimaes he linear regression model wih auocorrelaion correced using he /NLAG=1 opion indicaing he AR(1) process.

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 16 6. Correcing Auocorrelaion: Feasible Generalized Leas Squares This secion illusraes mehods o correc auocorrelaion using he Prais-Winsen s FGLS (Feasible Generalized Leas Squares) and he Cochrane-Orcu FGLS. If Ω is known, you may ry GLS (Generalized Leas Squares). 6.1 FGLS in STATA This secion illusraes how o esimae FGLS in STATA. See secion 5 for he descripion of he daa se used. 6.1.1 Daa Preparaion. infile Year G Pg Y Pnc Puc Pp Pd Pn Ps Pop /// using hp://pages.sern.nyu.edu/~wgreene/tex/ables/tablef-.x, clear. drop if Year==.. sse Year ime variable: Year, 1960 o 1995. gen lng=ln(g/pop). gen lnpg=ln(pg). gen lni=ln(y). gen lnpnc=ln(pnc). gen lnpuc=ln(puc). sum ln* // summary saisics Variable Obs Mean Sd. Dev. Min Max -------------+-------------------------------------------------------- lng 36 -.0037086.1516908 -.335819.16097 lnpg 36.6740943.6048 -.089947 1.41318 lni 36 9.11098.048051 8.705497 9.387147 lnpnc 36.443198.3794 -.0090407 1.03496 lnpuc 36.66361.6301064 -.179166 1.65363. global OLS "lng lnpg lni lnpnc lnpuc". regress $OLS Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 176.71 Model.771516959 4.198794 Prob > F = 0.0000 Residual.033836907 31.001091513 R-squared = 0.9580 -------------+------------------------------ Adj R-squared = 0.956 Toal.805353866 35.0301011 Roo MSE =.03304 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.0590955.034849-1.8 0.079 -.15349.007158 lni 1.3734.075677 18.16 0.000 1.19156 1.57643 lnpnc -.167969.169934-1.00 0.36 -.3858017.13079 lnpuc -.118708.0813371-1.46 0.154 -.84596.0471799 _cons -1.34184.6748946-18.9 0.000-13.7183-10.96539. predic e, residuals. gen e1=l.e. gen e_=e^. gen ee1=e*e1. gen e1_=e1^. gen e_e1_=(e-e1)^

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 17. absa e e1 e_ ee1 e1_ e_e1_, sa(n sum mean) save sas e e1 e_ ee1 e1_ e_e1_ ---------+------------------------------------------------------------ N 36 35 36 35 35 35 sum -3.73e-09.00744.0338369.08194.0334066.00461 mean -1.03e-10.000597.0009399.00065.0009545.0005846 ----------------------------------------------------------------------. marix sum=r(satoal). local s_e_ = sum[,3] //.03383691. local s_ee1 = sum[,4] //.081944. local s_e1_ = sum[,5] //.03340659. local s_e_e1_ = sum[,6] //.0046115. local T = sum[1,1] //36 6.1. Compuing Auocorrelaion Coefficien There are various ways of esimaing he auocorrelaion parameer ρ. Auoregressive effor models o correc auocorrelaion depend on he ρ esimaor and esimaion mehods such as ieraive and marix likelihood mehods. The ρ is ofen esimaed using auocorrelaion formula and Durbin-Wason d.. local rho=`s_ee1'/`s_e_' // Auocorrelaion rho: rhoype(scorr).67439496. dwsa // DW d Durbin-Wason d-saisic( 5, 36) =.6046993. local dw= `s_e_e1_'/`s_e_' // DW d.60469933. local rho = 1-`dw'/ // DW based rho: rhoype(dw).69765033 In addiion o scorr (auocorrelaion coefficien) and dw (D-W d-based rho), STATA provides heil (adjusmen of auocorrelaion coefficien), nagar (adjusmen of D-W d-based coefficien), regress (defaul opion, he coefficien of regression e on e -1 wihou inercep), and freg (he coefficien of regression e on e +1 wihou inercep) opions. local rho=`s_ee1'/`s_e_'*($t-$k)/($t) //Theil rho: rhoype(heil).5807899. local rho = ((1-`dw'/)*$T^+$K^)/($T^-$K^) // Nagar.7310436. regress e e1, noc // for he rho based on regression on he lagged residuals Source SS df MS Number of obs = 35 -------------+------------------------------ F( 1, 34) = 30.98 Model.015587547 1.015587547 Prob > F = 0.0000 Residual.017105895 34.000503115 R-squared = 0.4768 -------------+------------------------------ Adj R-squared = 0.4614 Toal.0369344 35.000934098 Roo MSE =.043 e Coef. Sd. Err. P> [95% Conf. Inerval] e1.6830819.1706 5.57 0.000.4336837.934801. marix b1 = e(b). local rho = b1[1,1]. disp `rho' //.68308194. gen e0=e[_n+1] (1 missing value generaed)

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 18. quiely regress e e0, noc // rho based on regression wih he leaded residuals. marix b = e(b). local rho = b[1,1] //.6979816 Once a ρ esimaor is deermined, variables and he inercep need o be ransformed using he esimaor.. foreach var of global OLS {. gen T`var' = sqr(1-`rho'^)*`var' if (_n==1) 3. replace T`var' = `var'-`rho'*`var'[_n-1] if (_n!=1) 4. }. gen Inercep = sqr(1-`rho'^) if (_n==1). replace Inercep = 1 -`rho' if (_n!=1) Alernaively, you may explicily ransform daa variable by variable as follows.. gen TlnG = sqr(1-`rho'^)*lng if (_n==1). replace TlnG = lng-`rho'*lng[_n-1] if (_n!=1). gen TlnPg = sqr(1-`rho'^)*lnpg if (_n==1). replace TlnPg = lnpg-`rho'*lnpg[_n-1] if (_n!=1). gen TlnI = sqr(1-`rho'^)*lni if (_n==1). replace TlnI = lni-`rho'*lni[_n-1] if (_n!=1). gen TlnPnc = sqr(1-`rho'^)*lnpnc if (_n==1). replace TlnPnc = lnpnc-`rho'*lnpnc[_n-1] if (_n!=1). gen TlnPuc = sqr(1-`rho'^)*lnpuc if (_n==1). replace TlnPuc = lnpuc-`rho'*lnpuc[_n-1] if (_n!=1) 6.1.3 Prais-Winsen FGLS Now, you are ready o fis he Prais-Winsen FGLS wih he ransformed daa. The inercep should be suppressed in he OLS. Thus, he F es and R are no reliable. Le us firs uses he ρ esimaor compued from he auocorrelaion formula.. local rho=`s_ee1'/`s_e_' // Auocorrelaion rho: rhoype(scorr) (daa ransformaion is skipped). regress TlnG TlnPg TlnI TlnPnc TlnPuc Inercep, nocons // Prais-Winsen FGLS Source SS df MS Number of obs = 36 -------------+------------------------------ F( 5, 31) = 57.39 Model.13379898 5.0675858 Prob > F = 0.0000 Residual.01445375 31.00046649 R-squared = 0.905 -------------+------------------------------ Adj R-squared = 0.8868 Toal.1484663 36.00411796 Roo MSE =.0159 TlnG Coef. Sd. Err. P> [95% Conf. Inerval] TlnPg -.146380.037076-3.95 0.000 -.1997 -.0707631 TlnI 1.7864.1054467 1.1 0.000 1.06304 1.49334 TlnPnc -.0398843.176357-0.31 0.757 -.300199.04304 TlnPuc -.0669309.07669-0.87 0.389 -.3173.0893554 Inercep -11.49075.9390551-1.4 0.000-13.40597-9.575537

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 19 The.prais command by defaul fis he Prais-Winsen FGLS. Use he rhoype(scorr) opion o specify he ype of ρ esimaor. The wosep opion sops ieraion afer he firs ieraion. The oupu is he same as he above. Compare SSM, he degree of freedom for he model, F o hose of he above.. prais $OLS, rhoype(scorr) wosep // Auocorrelaion Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6744 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 71.50 Model.133347816 4.033336954 Prob > F = 0.0000 Residual.01445375 31.00046649 R-squared = 0.90 -------------+------------------------------ Adj R-squared = 0.8896 Toal.147801541 35.004901 Roo MSE =.0159 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.1463803.037076-3.95 0.000 -.19974 -.070763 lni 1.7863.1054466 1.1 0.000 1.06303 1.49333 lnpnc -.0398849.176357-0.31 0.757 -.3001995.0498 lnpuc -.0669303.07669-0.87 0.389 -.3166.089356 _cons -11.49075.9390546-1.4 0.000-13.40596-9.575531 rho.674395 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.110699 Le us use he D-W d-based ρ esimaor (=1-d/).. local rho = 1-`dw'/ // DW based rho: rhoype(dw) (daa ransformaion is skipped). regress TlnG TlnPg TlnI TlnPnc TlnPuc Inercep, nocons // Prais-Winsen FGLS Source SS df MS Number of obs = 36 -------------+------------------------------ F( 5, 31) = 54.03 Model.155071 5.04510144 Prob > F = 0.0000 Residual.01406158 31.000453618 R-squared = 0.8971 -------------+------------------------------ Adj R-squared = 0.8805 Toal.13661879 36.00379480 Roo MSE =.013 TlnG Coef. Sd. Err. P> [95% Conf. Inerval] TlnPg -.153066.037055-4.11 0.000 -.78756 -.0767376 TlnI 1.66635.107309 11.80 0.000 1.047777 1.485493 TlnPnc -.0308443.171973-0.4 0.810 -.90649.85764 TlnPuc -.0638014.0758518-0.84 0.407 -.18501.0908993 Inercep -11.3873.95549-11.9 0.000-13.33604-9.438561 The rhoype(dw) opion uses he D-W d-based ρ esimaor when esimaing auoregressive error models.. prais $OLS, rhoype(dw) wosep Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6977

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 0 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 67.4 Model.1007581 4.030501895 Prob > F = 0.0000 Residual.01406161 31.000453618 R-squared = 0.8967 -------------+------------------------------ Adj R-squared = 0.8833 Toal.136069743 35.003887707 Roo MSE =.013 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.153067.037055-4.11 0.000 -.78757 -.0767377 lni 1.66636.1073091 11.80 0.000 1.047778 1.485494 lnpnc -.0308446.171973-0.4 0.810 -.90653.85761 lnpuc -.0638011.0758518-0.84 0.407 -.185019.0908996 _cons -11.38731.955496-11.9 0.000-13.33605-9.438566 rho.6976503 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.137768 The following example uses he Theil s ρ esimaor, which adjuss he auocorrelaion coefficien.. local rho=`s_ee1'/`s_e_'*($t-$k)/($t) //Theil rho: rhoype(heil).5807899. prais $OLS, rhoype(heil) wosep // Theil rho Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.5781 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 89.96 Model.18793475 4.046983681 Prob > F = 0.0000 Residual.016189637 31.000546 R-squared = 0.907 -------------+------------------------------ Adj R-squared = 0.9105 Toal.041436 35.0058315 Roo MSE =.085 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.13546.0367836-3.36 0.00 -.1985669 -.048554 lni 1.31413.09814 13.38 0.000 1.11381 1.514439 lnpnc -.0700476.18909-0.54 0.591 -.339597.198645 lnpuc -.07908.0791098-1.00 0.34 -.405664.08147 _cons -11.81037.8751567-13.50 0.000-13.5956-10.0547 rho.578058 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.010610 The following uses he adjusmen of D-W d-based ρ esimaor.. local rho = ((1-`dw'/)*$T^+$K^)/($T^-$K^) // Nagar.7310436. prais $OLS, rhoype(nagar) wosep Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.746 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 58.73

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 1 Model.10064676 4.05160669 Prob > F = 0.0000 Residual.0138016 31.0004839 R-squared = 0.8834 -------------+------------------------------ Adj R-squared = 0.8684 Toal.1139839 35.00354938 Roo MSE =.007 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.1649401.0368649-4.47 0.000 -.40166 -.0897536 lni 1.3788.11179 11.1 0.000 1.01087 1.464783 lnpnc -.0096368.161748-0.08 0.940 -.6697.476984 lnpuc -.057143.0740091-0.77 0.446 -.080859.0937994 _cons -11.1313.9905196-11.4 0.000-13.1515-9.111143 rho.7461546 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.199445 The following uses he defaul ype of ρ esimaor, which is obained by regressing e on e -1 wihou he inercep.. prais $OLS, rhoype(regress) wosep // defaul Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6831 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 69.90 Model.1908315 4.0357079 Prob > F = 0.0000 Residual.01430648 31.00046149 R-squared = 0.900 -------------+------------------------------ Adj R-squared = 0.8873 Toal.14333456 35.00409573 Roo MSE =.0148 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.148580.037071-4.01 0.000 -.4189 -.07971 lni 1.74075.1061383 1.00 0.000 1.057605 1.490546 lnpnc -.036596.17477-0.9 0.776 -.965837.33986 lnpuc -.0657675.0763471-0.86 0.396 -.14784.0899434 _cons -11.45348.9451596-1.1 0.000-13.38115-9.55816 rho.6830819 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.10645 The following uses he ρ esimaor obained by regressing e on e +1 wihou he inercep.. prais $OLS, rhoype(freg) wosep Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6980 Prais-Winsen AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 67.18 Model.1185093 4.03046731 Prob > F = 0.0000 Residual.014056649 31.00045344 R-squared = 0.8966 -------------+------------------------------ Adj R-squared = 0.883 Toal.135907573 35.003883074 Roo MSE =.019 lng Coef. Sd. Err. P> [95% Conf. Inerval]

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: lnpg -.15391.0370518-4.11 0.000 -.79598 -.076844 lni 1.6646.1073359 11.80 0.000 1.047547 1.485373 lnpnc -.0307104.171908-0.4 0.811 -.901177.86969 lnpuc -.0637561.075840-0.84 0.407 -.18433.090909 _cons -11.38574.955793-11.91 0.000-13.33497-9.43651 rho.69798 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.138165 6.1.4 Cochrane-Orcu FGLS Like Prais-Winsen FGLS, Cochrane-Orcu FGLS runs OLS wih he ransform daa. Unlike he Prais-Winsen, he Cochrane-Orcu ignores he firs observaion. Le us begin wih Cochrane-Orcu FGLS using he auocorrelaion coefficien.. regress TlnG TlnPg TlnI TlnPnc TlnPuc Inercep if _n > 1, nocons Source SS df MS Number of obs = 35 -------------+------------------------------ F( 5, 30) = 31.05 Model.073993944 5.014798789 Prob > F = 0.0000 Residual.01499108 30.000476637 R-squared = 0.8380 -------------+------------------------------ Adj R-squared = 0.8111 Toal.0889305 35.005659 Roo MSE =.0183 TlnG Coef. Sd. Err. P> [95% Conf. Inerval] TlnPg -.14636.0380588-3.75 0.001 -.0365 -.0649094 TlnI 1.39594.1396031 9.5 0.000 1.044487 1.61470 TlnPnc -.0793608.146485-0.54 0.59 -.378534.198018 TlnPuc -.0561649.0797507-0.70 0.487 -.190375.1067078 Inercep -11.9537 1.4988-9.56 0.000-14.5063-9.401116 The.prais command has he corc opion o esimae Cochrane-Orcu FGLS.. prais $OLS, rhoype(scorr) wosep corc Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6744 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 36.74 Model.070051 4.01751305 Prob > F = 0.0000 Residual.0149911 30.000476637 R-squared = 0.8305 -------------+------------------------------ Adj R-squared = 0.8079 Toal.0843511 34.00480918 Roo MSE =.0183 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.14636.0380589-3.75 0.001 -.0367 -.0649096 lni 1.39593.139603 9.5 0.000 1.044486 1.6147 lnpnc -.079361.146485-0.54 0.59 -.378537.198016 lnpuc -.0561643.0797507-0.70 0.487 -.19037.1067084 _cons -11.9537 1.49881-9.56 0.000-14.5063-9.401107 rho.674395 Durbin-Wason saisic (original) 0.604699

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 3 Durbin-Wason saisic (ransformed) 1.1550 The following wo oupus use he D-W d-based ρ esimaor.. regress TlnG TlnPg TlnI TlnPnc TlnPuc Inercep if _n > 1, nocons Source SS df MS Number of obs = 35 -------------+------------------------------ F( 5, 30) = 8.41 Model.06618909 5.01337818 Prob > F = 0.0000 Residual.013979013 30.000465967 R-squared = 0.856 -------------+------------------------------ Adj R-squared = 0.7966 Toal.080168105 35.0090517 Roo MSE =.0159 TlnG Coef. Sd. Err. P> [95% Conf. Inerval] TlnPg -.14984.03897-3.90 0.000 -.7358 -.071069 TlnI 1.307018.1448034 9.03 0.000 1.0119 1.60746 TlnPnc -.0599178.1461395-0.41 0.685 -.3583746.385389 TlnPuc -.0563603.0788697-0.71 0.480 -.174338.104713 Inercep -11.7519 1.977-9.06 0.000-14.4013-9.10544. prais $OLS, rhoype(dw) wosep corc Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6977 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 33.33 Model.06119363 4.01559841 Prob > F = 0.0000 Residual.013979017 30.000465967 R-squared = 0.8163 -------------+------------------------------ Adj R-squared = 0.7918 Toal.07609838 34.0038188 Roo MSE =.0159 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.14986.03897-3.90 0.000 -.73581 -.07107 lni 1.307019.1448035 9.03 0.000 1.0119 1.60747 lnpnc -.059918.1461396-0.41 0.685 -.3583748.385388 lnpuc -.05636.0788697-0.71 0.480 -.174336.1047135 _cons -11.75193 1.9771-9.06 0.000-14.40131-9.10547 rho.6976503 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.140131 The followings esimae oher auoregressive error models using oher ρ esimaors such as Theil s esimaor. Pay aenion o he rhoype() opion.. prais $OLS, rhoype(heil) wosep corc Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.5781 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 53.70 Model.111987045 4.07996761 Prob > F = 0.0000 Residual.01564161 30.00051387 R-squared = 0.8774 -------------+------------------------------ Adj R-squared = 0.8611 Toal.1768655 34.003753784 Roo MSE =.083

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 4 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.118986.037015-3.1 0.003 -.194594 -.0433779 lni 1.385947.105699 11.49 0.000 1.13971 1.63183 lnpnc -.14049.1459554-0.96 0.344 -.4385097.1576518 lnpuc -.0554635.083714-0.67 0.506 -.3688.117613 _cons -1.45608 1.077645-11.56 0.000-14.65693-10.554 rho.578058 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.05970. prais $OLS, rhoype(nagar) wosep corc Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.746 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 7.31 Model.0483538 4.01088095 Prob > F = 0.0000 Residual.01378094 30.00044603 R-squared = 0.7846 -------------+------------------------------ Adj R-squared = 0.7558 Toal.061630474 34.00181661 Roo MSE =.0104 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.1643651.0384036-4.8 0.000 -.47958 -.0859344 lni 1.45164.1559178 7.99 0.000.967376 1.563591 lnpnc -.0141688.1443708-0.10 0.9 -.3090133.806758 lnpuc -.0561394.0766464-0.73 0.470 -.167.1003934 _cons -11.19776 1.399397-8.00 0.000-14.0557-8.339815 rho.7461546 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.174443. prais $OLS, rhoype(regress) wosep corc // defaul Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6831 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 35.43 Model.066988349 4.016747087 Prob > F = 0.0000 Residual.0141806 30.00047674 R-squared = 0.853 -------------+------------------------------ Adj R-squared = 0.800 Toal.081168575 34.00387311 Roo MSE =.0174 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.1450741.038181-3.80 0.001 -.94 -.06706 lni 1.31657.141566 9.34 0.000 1.0361 1.61069 lnpnc -.0731.1463868-0.49 0.65 -.371718.66517 lnpuc -.056499.0794347-0.71 0.484 -.18477.1059774 _cons -11.888 1.67388-9.38 0.000-14.47115-9.94444 rho.6830819 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.130955. prais $OLS, rhoype(freg) wosep corc

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 5 Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6980 Cochrane-Orcu AR(1) regression -- wosep esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 33.8 Model.0601395 4.015503099 Prob > F = 0.0000 Residual.0139744 30.000465813 R-squared = 0.8161 -------------+------------------------------ Adj R-squared = 0.7916 Toal.075986795 34.0034906 Roo MSE =.0158 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.149380.038318-3.91 0.000 -.746 -.0713004 lni 1.306665.1448787 9.0 0.000 1.010783 1.60547 lnpnc -.059677.146136-0.41 0.686 -.3580704.388149 lnpuc -.0563619.0788564-0.71 0.480 -.174081.104684 _cons -11.74877 1.97958-9.05 0.000-14.39955-9.097981 rho.69798 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.14034 6.1.5 Ieraive Prais-Winsen and Cochrane-Orcu FGLS STATA provides he ieraive wo-sep esimaion mehod for he Prais-Winsen and Cochrane- Orcu FGLS.. prais $OLS, rhoype(scorr) // Ieraive Prais-Winsen FGLS Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6744 Ieraion : rho = 0.8361 Ieraion 3: rho = 0.9030 Ieraion 4: rho = 0.973 Ieraion 5: rho = 0.9366 Ieraion 6: rho = 0.9403 Ieraion 7: rho = 0.9419 Ieraion 8: rho = 0.946 Ieraion 9: rho = 0.948 Ieraion 10: rho = 0.9430 Ieraion 11: rho = 0.9430 Ieraion 1: rho = 0.9430 Ieraion 13: rho = 0.9431 Ieraion 14: rho = 0.9431 Ieraion 15: rho = 0.9431 Ieraion 16: rho = 0.9431 Prais-Winsen AR(1) regression -- ieraed esimaes Source SS df MS Number of obs = 36 -------------+------------------------------ F( 4, 31) = 31.14 Model.04459443 4.011148606 Prob > F = 0.0000 Residual.011097443 31.00035798 R-squared = 0.8007 -------------+------------------------------ Adj R-squared = 0.7750 Toal.055691865 35.001591196 Roo MSE =.0189 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.101637.0347875-6.04 0.000 -.811133 -.13914 lni 1.071587.18855 8.3 0.000.8087905 1.334383 lnpnc.093975.15189 0.75 0.459 -.161413.3493581 lnpuc -.0341095.0653817-0.5 0.606 -.1674564.099375 _cons -9.666983 1.148614-8.4 0.000-1.0096-7.34369

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 6 rho.9430583 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.531091 The following example is he ieraive Cochrane-Orcu FGLS.. prais $OLS, rhoype(scorr)corc // Ieraive Cochrane-Orcu FGLS Ieraion 0: rho = 0.0000 Ieraion 1: rho = 0.6744 Ieraion : rho = 0.8080 Ieraion 3: rho = 0.9037 Ieraion 4: rho = 0.935 Ieraion 5: rho = 0.979 Ieraion 6: rho = 0.994 Ieraion 7: rho = 0.9300 Ieraion 8: rho = 0.9301 Ieraion 9: rho = 0.930 Ieraion 10: rho = 0.9303 Ieraion 11: rho = 0.9303 Ieraion 1: rho = 0.9303 Ieraion 13: rho = 0.9303 Ieraion 14: rho = 0.9303 Cochrane-Orcu AR(1) regression -- ieraed esimaes Source SS df MS Number of obs = 35 -------------+------------------------------ F( 4, 30) = 1.15 Model.098913 4.00747831 Prob > F = 0.0000 Residual.01060038 30.000353346 R-squared = 0.738 -------------+------------------------------ Adj R-squared = 0.7033 Toal.04049170 34.00119093 Roo MSE =.0188 lng Coef. Sd. Err. P> [95% Conf. Inerval] lnpg -.318.03646-6.10 0.000 -.967836 -.147857 lni.884741.033351 4.35 0.000.4694755 1.300007 lnpnc.091974.137493 0.74 0.463 -.1607557.3447038 lnpuc -.0491.065593-0.64 0.54 -.1760577.0915996 _cons -7.865689 1.897604-4.15 0.000-11.74111-3.99064 rho.930665 Durbin-Wason saisic (original) 0.604699 Durbin-Wason saisic (ransformed) 1.515506 6. FGLS in SAS SAS suppor boh (ieraive) wo-sep Prais-Winen and maximum likelihood algorihms. 6..1 Two-sep Prais-Winsen Esimaion Once variables are ransformed, run OLS wih he inercep suppressed in he REG procedure. SAS by defaul uses he auocorrelaion coefficien as he ρ esimaor. PROC REG DATA=masil.gasoline; MODEL TlnG = Inercep TlnPg TlnI TlnPnc TlnPuc /NOINT; RUN; The REG Procedure Model: MODEL1 Dependen Variable: TlnG

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 7 Number of Observaions Read 36 Number of Observaions Used 36 NOTE: No inercep in model. R-Square is redefined. Analysis of Variance Sum of Mean Source DF Squares Square F Value Pr > F Model 5 0.13379 0.0676 57.39 <.0001 Error 31 0.01445 0.0004665 Uncorreced Toal 36 0.1485 Roo MSE 0.0159 R-Square 0.905 Dependen Mean 0.0035 Adj R-Sq 0.8868 Coeff Var 614.10313 Parameer Esimaes Parameer Sandard Variable DF Esimae Error Value Pr > Inercep 1-11.49075 0.93906-1.4 <.0001 TlnPg 1-0.14638 0.03708-3.95 0.0004 TlnI 1 1.786 0.10545 1.1 <.0001 TlnPnc 1-0.03988 0.1764-0.31 0.7568 TlnPuc 1-0.06693 0.07663-0.87 0.3891 The AUTOREG procedure esimaes auoregressive error models wihou daa ransformaion. The /NLAG=1 specifies he firs-order auocorrelaion. AUTOREG by defaul (METHOD=YW) compues he Yule-Walker (Prais-Winsen) FGLS esimaes. PROC AUTOREG DATA=masil.gasoline; MODEL lng = lnpg lni lnpnc lnpuc /NLAG=1; RUN; The AUTOREG Procedure Dependen Variable lng Ordinary Leas Squares Esimaes SSE 0.03383691 DFE 31 MSE 0.00109 Roo MSE 0.03304 SBC -130.8883 AIC -138.7464 Regress R-Square 0.9580 Toal R-Square 0.9580 Durbin-Wason 0.6047 Sandard Approx Variable DF Esimae Error Value Pr > Inercep 1-1.3418 0.6749-18.9 <.0001 lnpg 1-0.0591 0.035-1.8 0.0786 lni 1 1.3734 0.0756 18.16 <.0001 lnpnc 1-0.168 0.170-1.00 0.358 lnpuc 1-0.1187 0.0813-1.46 0.1545 Esimaes of Auocorrelaions

Jeeshim and KUCC65 (7/18/006) Auocorrelaion and he AR(1) Process: 8 Lag Covariance Correlaion -1 9 8 7 6 5 4 3 1 0 1 3 4 5 6 7 8 9 1 0 0.000940 1.000000 ******************** 1 0.000634 0.674395 ************* Preliminary MSE 0.00051 Esimaes of Auoregressive Parameers Sandard Lag Coefficien Error Value 1-0.674395 0.134807-5.00 Yule-Walker Esimaes SSE 0.01445373 DFE 30 MSE 0.0004818 Roo MSE 0.0195 SBC -157.609 AIC -166.7614 Regress R-Square 0.9019 Toal R-Square 0.981 Durbin-Wason 1.1161 Sandard Approx Variable DF Esimae Error Value Pr > Inercep 1-11.4907 0.9546-1.04 <.0001 lnpg 1-0.1464 0.0377-3.88 0.0005 lni 1 1.783 0.107 11.93 <.0001 lnpnc 1-0.0399 0.197-0.31 0.7607 lnpuc 1-0.0669 0.0779-0.86 0.3970 6.. Ieraive Two-sep Prais-Winsen Esimaion The AUTOREG procedure can correc auocorrelaion using he ieraive Yule-Walker mehod (METHOD=ITYW). PROC AUTOREG DATA=masil.gasoline; MODEL lng = lnpg lni lnpnc lnpuc /NLAG=1 METHOD=ITYW; RUN; The AUTOREG Procedure Dependen Variable lng Ordinary Leas Squares Esimaes SSE 0.03383691 DFE 31 MSE 0.00109 Roo MSE 0.03304 SBC -130.8883 AIC -138.7464 Regress R-Square 0.9580 Toal R-Square 0.9580 Durbin-Wason 0.6047 Sandard Approx Variable DF Esimae Error Value Pr > Inercep 1-1.3418 0.6749-18.9 <.0001 lnpg 1-0.0591 0.035-1.8 0.0786 lni 1 1.3734 0.0756 18.16 <.0001 lnpnc 1-0.168 0.170-1.00 0.358 lnpuc 1-0.1187 0.0813-1.46 0.1545