Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: xtgls bug?


From   Jos Elkink <jelkink@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: xtgls bug?
Date   Fri, 8 Oct 2004 09:19:58 -0700 (PDT)

During a summerschool this summer I tried to replicate
the xtgls procedure using my own Stata code. After
struggling with it for a while, I only managed to
replicate the outcome I get from the xtgls command by
programming what I think is a bug into my code. With
the following command:

xtgls <varlist>, p(c) c(a)

The procedure applies the Prais-Winsten transformation
to handle serial autocorrelation. This transformation
should be applied to all dependent and independent
variables, but xtgls also applies it to the constant.
This results in a constant that is not constant after
the transformation and hence completely different
estimates for that coefficient, and slightly different
ones for the other coefficients.

With my sample data (if I'm not mistaken the data used
in Greene 2000), I get the following results:

replication of xtgls:

         Coefficients  Standard errors
const.     -18.618496        4.9536745
fval        .08268366        .00631483
sval        .19423269        .03039866

corrected version (Prais-Winsten not applied to
constant):

         Coefficients  Standard errors
const.     -3.3568969        .75846539
fval        .08272517        .00641157
sval          .210618         .0313171

The version of xtgls I used was:

. which xtgls
C:\Stata8\ado\base\x\xtgls.ado
*! version 2.2.3  30oct2002

So my questions are:
1) Am I correct that the implementation of xtgls is an
incorrect version of Prais-Winsten?
2) Is this the right place to report such a bug, or if
not, where should I do this? Or has this bug already
been reported?

Jos

--
Jos Elkink
PhD Student
Trinity College Dublin
Dublin, Ireland
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index