[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: xtgls bug?
Jos Elkink <email@example.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.
* For searches and help try: