Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Getting the 'egranger' command to use the entire sample

From   Alex Letko <>
Subject   st: Getting the 'egranger' command to use the entire sample
Date   Thu, 16 Aug 2012 18:25:09 +0100

Hi Statalist,

The egranger command will not run the Engle-Granger 2-step
cointegration test accross my entire sample.  My sample consists of
3130 observations.  It only runs the test up to observation 2443, as
shown in the output below:

. egranger lnHH lnNBP
Replacing variable _egresid...

Engle-Granger test for cointegration                  N (1st step)  =     3130

N (test)      =     2443
                  Test         1% Critical       5% Critical      10% Critical
               Statistic           Value             Value             Value
 Z(t)             -2.424            -3.432            -2.862            -2.567

Critical values from MacKinnon (1990, 2010)

As you can see, the 1st step regression is done with the entire
sample, while the second step is only done with 2443 observations.
This only happens after I tsset my data according to the actual dates
of my dataset.  Like this:

gen Date=date(date1, "DMY")
format Date %td
tsset Date

When I only tsset not according to the date, like this:

gen time=_n
tsset time

it works fine and uses all the observations in the first step and 3129
in the second step.

I try to outsmart Stata by using the "tin" command, like so:

egranger lnHH lnNBP if tin(07sep1999, 03jul2012)

but I get the same exact results as the output above.

Is there a way of getting egranger to use the entire sample in the second step?

Thank you very much and I appreciate the help.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index