Tests for Autocorrelated Errors

In ordinary least square regression model, we specify the equation as
y = b0 + b1 x1 + b2 x2 + b3 x3 + b4 x4 + ut
and we can test the assumption of autocorrelation or we can test whether the disturbances are autocorrelated.
To test the autocorrelation, we can follow the steps below:
(i) Estimate the regression model above using ordinary least square approach/OLS:
sysuse auto, clear
gen t=_n
tsset t
reg price rep78 trunk length
. reg price rep78 trunk length
Source |       SS           df       MS      Number of obs   =        69
-------------+----------------------------------   F(3, 65)        =      6.42
Model |   131790806         3  43930268.8   Prob > F        =    0.0007
Residual |   445006152        65   6846248.5   R-squared       =    0.2285
-------------+----------------------------------   Adj R-squared   =    0.1929
Total |   576796959        68  8482308.22   Root MSE        =    2616.5
------------------------------------------------------------------------------
price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
rep78 |   578.7949   348.6211     1.66   0.102    -117.4495    1275.039
trunk |  -31.78264   108.8869    -0.29   0.771    -249.2447    185.6794
length |   70.17701   22.01136     3.19   0.002     26.21729    114.1367
_cons |  -8596.181   3840.351    -2.24   0.029    -16265.89   -926.4697
------------------------------------------------------------------------------

(ii)  Now calculate the residuals from the above regression:
predict errors, res
(iii)  Run another regression by inserting lagged residuals or the lag values of error terms, (errors) as predicted from above regression model into a regression model of the residuals as a dependent variable. Our regression model will be estimated through the following regression code in Stata: reg errors rep78 trunk length l.errors. We can consider this regression as auxiliary regression. The results from this auxiliary regression is given below
. reg errors rep78 trunk length l.errors
Source |       SS           df       MS      Number of obs   =        63
-------------+----------------------------------   F(4, 58)        =      4.66
Model |   104717963         4  26179490.9   Prob > F        =    0.0025
Residual |   325759819        58   5616548.6   R-squared       =    0.2433
-------------+----------------------------------   Adj R-squared   =    0.1911
Total |   430477782        62  6943190.04   Root MSE        =    2369.9
------------------------------------------------------------------------------
errors |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
rep78 |  -47.23696   332.1243    -0.14   0.887    -712.0559     617.582
trunk |   62.68025   103.8779     0.60   0.549    -145.2539    270.6144
length |   9.373147   20.97416     0.45   0.657     -32.6112    51.35749
|
errors |
L1. |   .5273932   .1225638     4.30   0.000      .282055    .7727313
|
_cons |  -2375.671   3741.339    -0.63   0.528    -9864.774    5113.432
------------------------------------------------------------------------------

(iv) Using the estimated results from auxiliary regression above, note the the R-squared value and multiply it by the number of included observations:
scalar N=_result(1)
scalar R2=_result(7)
scalar NR2= N*R2
scalar list N  R2  NR2
N =         63
R2 =  .24325986
NR2 =  15.325371

(v)  Now, the null hypothesis of BP test is that there is no autocorrelation, we can use the standard Chi-Square distribution to find the tabulated values of the Chi-Square to check if the null hypothesis of no autocorrelation needs to be rejected. According to theory, the Chi-Square statistic calculated using the NRSquare approach above, the test statistic NR2 converges asymptotically where degrees of freedom for the test is s which the number of lags of the residuals included in the auxiliary regression and we have included 1 lagged value of errors/residuals so degrees of freedom in this case is 1. We can use Stata conventional functions for distribution to determine the tabulated values at 5% level of significance using the following code:
scalar chi151=invchi2tail(1, .05)
scalar list chi151
chi15 =  3.8414598
We got from the above tutorial in tests for autocorrelation, NR2 = 15.325371 > 3.84 = Chi-Square (1, 5%). As the calculated value of Chi2 is greater than tabulated values of Chi2, so we reject the null hypothesis of no autocorrelation on the disturbances.

ARDL and Unit Root Testing using Eviews

ARDL Cointegration using Eviews 9

To estimate ARDL using Eviews 9 on Time Series Data, first open the data file/workfile, Click on your DV, press control key on keyboard, now left click to select all your IVs one by one, once selected then right click on any selected variables and open these as Equations. Once you get the Methods window in Eviews, go the methodology selection from Estimation Setting near to bottom, select ARDL from the list and click Okay. Now you cans elect the lags of DV and IV and any other options for the the methods. You can click on the OK button to get your estimates.

Augmented Dickey Fuller Unit Root Test using Eviews

Augmented Dickey Fuller Unit Root Test using Eviews We can test a time series variable for Unit Root Test following Augmented Dickey Fuller Approach in Eviews following the steps outlined below. First of all open the Eviews workfile or the Excel data in Eviews, then right click on any of the variables we would like to test for unit root based on Augmented Dickey Fuller Approach and click on Open. The series opens in spreadsheet in Eviews. We can click on View in the left upper corner of the new spreadsheet window in Eviews. Then we can click on Unit Root Test in this list that pops down by clicking on View tab. This opens the dialogue box as shown in the inserted screenshot from Eviews itself, we can see that it has mainly four sections. Main section is related to selecting the test type. The Eviews produces unit root test results following 6 methods. We will select the Augmented Dickey Fuller as test type. The we will select either the Level, Difference or Second Difference. Next we can select either to include intercept or both of trend and intercept or none. On the right side of the same window, we can either ask Eviews to use lags automatically or we can insert manually the maximum lags into the model to base our unit root test on. Once we select everything as per our assumed approach to test a series for unit root using Augmented Dickey Fuller Approach, we can click on OK to get the test results.

Phillips Perron Unit Root Test using Eviews

Phillips Perron (PP) Unit Root Test using Eviews We can test a time series variable for Unit Root Test following Phillips Perron (PP) Approach in Eviews following the steps outlined below. First of all open the Eviews workfile or the Excel data in Eviews, then right click on any of the variables we would like to test for unit root based on Phillips Perron (PP) Approach and click on Open. The series opens in spreadsheet in Eviews. We can click on View in the left upper corner of the new spreadsheet window in Eviews. Then we can click on Unit Root Test in this list that pops down by clicking on View tab. This opens the dialogue box as shown in the inserted screenshot from Eviews itself, we can see that it has mainly four sections. Main section is related to selecting the test type. The Eviews produces unit root test results following 6 methods. We will select the Phillips Perron (PP) as test type. The we will select either the Level, Difference or Second Difference. Next we can select either to include intercept or both of trend and intercept or none. On the right side of the same window, we can either ask Eviews to use lags automatically or we can insert manually the maximum lags into the model to base our unit root test on. Once we select everything as per our assumed approach to test a series for unit root using Phillips Perron (PP) Approach, we can click on OK to get the test results.

KPSS Unit Root Test using Eviews

KPSS Unit Root Test using Eviews We can test a time series variable for Unit Root Test following Kwiatkowski-Phillips-Schmidt-Shin Approach in Eviews following the steps outlined below. First of all open the Eviews workfile or the Excel data in Eviews, then right click on any of the variables we would like to test for unit root based on KPSS Approach and click on Open. The series opens in spreadsheet in Eviews. We can click on View in the left upper corner of the new spreadsheet window in Eviews. Then we can click on Unit Root Test in this list that pops down by clicking on View tab. This opens the dialogue box as shown in the inserted screenshot from Eviews itself, we can see that it has mainly four sections. Main section is related to selecting the test type. The Eviews produces unit root test results following 6 methods. We will select the KPSS as test type. The we will select either the Level, Difference or Second Difference. Next we can select either to include intercept or both of trend and intercept or none. On the right side of the same window, we can either ask Eviews to use lags automatically or we can insert manually the maximum lags into the model to base our unit root test on. Once we select everything as per our assumed approach to test a series for unit root using KPSS Approach, we can click on OK to get the test results.

Ng-Perron Unit Root Test using Eviews

We can test a time series variable for Unit Root Test following Ng-Perron Approach in Eviews following the steps outlined below. First of all open the Eviews workfile or the Excel data in Eviews, then right click on any of the variables we would like to test for unit root based on Ng-Perron Approach and click on Open. The series opens in spreadsheet in Eviews. We can click on View in the left upper corner of the new spreadsheet window in Eviews. Then we can click on Unit Root Test in this list that pops down by clicking on View tab. This opens the dialogue box as shown in the inserted screenshot from Eviews itself, we can see that it has mainly four sections. Main section is related to selecting the test type. The Eviews produces unit root test results following 6 methods. We will select the Ng-Perron as test type. The we will select either the Level, Difference or Second Difference. Next we can select either to include intercept or both of trend and intercept or none. On the right side of the same window, we can either ask Eviews to use lags automatically or we can insert manually the maximum lags into the model to base our unit root test on. Once we select everything as per our assumed approach to test a series for unit root using Ng-Perron Approach, we can click on OK to get the test results.

Cointegration, Unit Root and ARDL

Assume we have three variables. X1, X2 and X3. In all of the following three cases, we can to test all of X variables for unit root by at least two to three different tests. I personally recommend using ADF and KPSS to test the opposite null hypotheses. ADF's null is unit root series and KPSS is stationary series. Case 1. If all variables are I(0), we can use VAR as Johansen-Juselieus Cointegration Pre-condition is not satisfied. Case 2. If Two variables are I(1) but only one is I(0), or Two are I(0) and one is I(1), then ARDL from Pesaran (2001) is a feasible approach. Case 3. If at least one variable is I(2) and others are either I(0) or I(1) or mixed, the Toda-Yamamoto Causality can be applied after estimated the VAR. Note also, Toda-Yamamoto is a causality test not a test of short run or long run relationship and I usually assume Granger type causality by Toda-Yamamoto or Granger Causality itself has no dependent on VECM or Cointegration.

So in nutshell, If you variables all I(0), you can use VAR. If your all variables are I(1) or I(2), use JJ and Granger Causality. If all variables are mixed I(1) and I(0) but none is I(2), use ARDL and you can also use Granger Causality after running a VAR. If you have mixed order I(0), I(1) and I(2), use Toda Yamamoto Causality Test.

Step By Step Instructions for running ARDL in Eviews.

The steps to conduct ARDL cointegration test in Eviews are:

  1. Open your time series in Eviews
  2. Dfuller and KPSS your variables to check no variable is I(2)
  3. Single click on Dependent Variable (DV)
  4. Press Ctrl Key on keyboard, and click one on all Independent variables (IV) one by one
  5. Once DV and IV are are selected, Righ click on them
  6. A small caption open, Click on Open As Equation
  7. Another selection window appear, select maximum lags for DV and IV
  8. Click on Ok go get the ARDL estimates.

The screenshot will explain the required steps in simple to understand instructions.

Cointegration, Unit Root and ARDL

Cointegration, Unit Root and ARDL

We will share the complete the silenced one minute video tutorial in next part of this tutorial.

The step by step instruction of run ARDL using Stata can be:

  1. Open your data in Stata
  2. Tsset your data with the time variable
  3. Dfuller and KPSS your variables
  4. There should be no I(2) in the variables.
  5. Findit ardl code
  6. or scc install ardl
  7. Once installed, run the code as: ardl dv ivs, lags(#) ec
  8. ## should be replaced with a number of lags.

Time Series Econometrics using Stata

Time Series Data is frequently evaluated by faculty and professional researchers to deduce short and long run relationships, to test the trends and volatility, to find any nonlinearities in the relationships or finding any eventual factors affecting the nature of relationships and hence all of the above conditions as affecting the power of their forecasting power. The course introduces and develops from basic to the advanced techniques to deal with different types of  time series data, whether low frequency (yearly, quarterly, monthly, weekly) or high frequency (daily or hourly), identify the exact model to apply and hence deduce the exact relationship for forecasting purposes. Furthermore, the course will help the audience to develop advanced Econometric modeling skills also applicable in a range of areas from Economics to finance, from social to political sciences, from energy to environmental sciences, education and health sciences.

Course Outline

Objectives
The course aims to achieve the following goals:

1.      Introduce you the basic econometric methods for time series data
2.      Introduce you to advanced techniques to deal with these models and their application
3.      Introduce the use of Stata and R more rigorously for time series models
4.      Provide a detailed introduction to latest theoretical development and applications
5.      Provide extension of developed models to new areas of research

Outcomes
Completing the course will enable you to:

1.      Learn how to use a model suitable for specific type of data
2.      Learn how to evaluate a model if suitable for a type of data
3.      Distinguish the modeling strategy between different types of data
4.      Know the features of Stata and R for time series modeling, estimation and forecasting
5.      Learn to Write and Report Results for Papers, Theses and Dissertations

Audience
The course is developed for the following groups:

1.      MS/PhD Students in Economics, Finance, Statistics and Other Social Sciences
2.      Academic Researchers of Universities and Colleges
3.      Researchers of R&D and Policy Research Organizations
4.      Research Officers of NPO and Social Organizations
5.      Consultants, Trainers And Policy Analysts
6.      Management, Exectives of Marketing and Social Research Organizations

Registration
100 place in total available for 5 groups of 20 participants. Groups will be formed on the basis of fields of studies and research. Please fill the registration on https://elearning.aneconomist.com
Contents

·         Topic 1: Stationary Time-Series Models
·         Topic 2: Testing for Trends and Unit Roots
·         Topic 3: Modeling Volatility
·         Topic 4: Multiequation Time-Series Models
·         Topic 5: Cointegration and Error-Correction Models
·         Topic 6: Nonlinear time-series models

Fees
The course fee is £500. 15% discount fee will be charged for each member of a group of registrations up to 5 participants. Groups of higher than 5 registrations will be discounted by 30% for each participant.

Supporting Material
The learning materials include EBooks, examples of MS Excel documents and related lecture materials will be provided in form of datasets.

Certification
There is Test, Assignment after each Week. Passing this will enable you to request for PASS certificate of the course mentioning your topics, assignment topics, grades in tests and assignments. Hard Copy of the Certificate will mailed at additional £10 to any destination across the world. If you do not need to request your certificate in paper, no charges are applicable. Soft/Scanned copies will be provided free of cost via email and downloadable from course portal.

Financial Econometrics Using Matlab

Special Four Weeks long course has been developed and launched on Financial Econometrics using Matlab. The course is equally important to the beginners and advanced learners in Finance, Economics and Financial Econometrics who want to a sense of modeling and analysis. The main objective of the course is to introduce the theory and application of Financial Econometrics and how to use the powerful math tool, the Matlab for analysis and simulation. Objective of the course is specifically to develop strong academic knowledge in Financial Econometrics, its practical use and hands on use of Matlab.

The course is planned in three sections:
·         Registration starts today
·         Registration ends:November 15, 2016
·         Course Begins:November 21, 2016

Main contents are:

Exempted Topics for Advanced Learners in Statistics and Econometrics
·         Introduction to Probability
·         Introduction to Random Variables
·         Random Sequences

Basic Course Topics for All
·         Introduction to Computer Simulation of Random Variables
·         Foundations of Monte Carlo Simulations
·         Fundamentals of Quasi Monte Carlo (QMC) Simulations
·         Introduction to Random Processes
·         Solution of Stochastic Differential Equations
·         General Approach to the Valuation of Contingent Claims
·         Pricing Options using Monte Carlo Simulations
·         Term Structure of Interest Rates and Interest Rate Derivatives
·         Credit Risk and the Valuation of Corporate Securities
·         Valuation of Portfolios of Financial Guarantees
·         Risk Management and Value at Risk (VaR)
·         Value at Risk (VaR) and Principal Components Analysis (PCA)

All these topics will be discussed in context of Matlab

The course fee structure

For Individuals:
·         Default: 500GBP for three months,

For Groups/Institutions:
·         Default: 1000GBP for Three Months,

MatLab M-files, EBooks, Manuals, Example datasets, EBooks and weekly lecture slides will be provided before commencement of each lecture.
The course will be offered to those who register on https://elearning.aneconomist.com. Registration should be confirmed within a week, or the system will delete all those accounts not with a status of confirmed payment and enrolment for a course.