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

Re: st: xtgls bug?


From   vwiggins@stata.com (Vince Wiggins, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: xtgls bug?
Date   Fri, 08 Oct 2004 12:55:09 -0500

Jos Elkink <jelkink@yahoo.com> believes he has discovered a bug in -xtgls-,

> [...]
> 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.
> [...]
> 1) Am I correct that the implementation of xtgls is an
> incorrect version of Prais-Winsten?

Quite the opposite, by trying to match the results of -xtgls- Jos has
uncovered a bug in his own implementation.  Not only is transforming the
"constant" not a bug, it is required to get consistent estimates.  There is
nothing special about the constant among the set of covariates and when
deriving the Prais-Winston, or Cochran-Orcutt, estimator and the GLS
transformation applies to ALL of the covariates.

As to the "constant" not being constant after the transformation, that is true
enough, but its coefficient will be the Prais-Winston estimator of the
intercept.  What's more, if the constant is not transformed, it will NOT be a
consistent estimator of the intercept.

 
-- Vince
   vwiggins@stata.com

*
*   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