Statalist


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

Re: st: _robust and weights [WAS: ivreg2 results do not replicate from stata 9 to stata 11]


From   [email protected] (Jeff Pitblado, StataCorp LP)
To   [email protected]
Subject   Re: st: _robust and weights [WAS: ivreg2 results do not replicate from stata 9 to stata 11]
Date   Fri, 14 Aug 2009 12:57:24 -0500

Mark Schaffer <[email protected]> discovered that -_robust- with weights
is producing different values in Stata 11 than in Stata 10:

> Hi all.  I think I've traced this to an apparent change in behaviour of
> the _robust command when used with weights between Stata 10 and Stata
> 11.  I'm using Stata IC running under Windows XP.
> 
> The change in behaviour of _robust can be demonstrated using -regress-
> and the toy auto dataset, and the example in the on-line help for
> _robust.
> 
> Under Stata 10 (and probably earlier but I haven't checked), using
> _robust and aweights or fweights replicates the results obtained with
> -regress, robust-.  Under Stata 11, the results with -regress, robust-
> are the same as Stata 10, but the results with _robust are different.
> 
> Here is the code that demonstrates:
> 
> sysuse auto
> qui regress mpg weight gear_ratio foreign [aw=trunk], mse1
> matrix D = e(V)
> predict double e, residual
> _robust e [aw=trunk], v(D) minus(4)
> matrix list D
> qui regress mpg weight gear_ratio foreign [aw=trunk], robust
> mat list e(V)
> 
> The two VCVs are the same under Stata 10 but not under Stata 11.
> 
> The discrepancy is the same with fweights.  pweights are a bit different
> because the VCVs obtained using the two methods aren't (supposed to be)
> the same, but the Stata 10 VCV obtained with _robust and pweights is
> different from that obtained with Stata 11's _robust and pweights.
> 
> I've reported this to Stata Tech Support, but in the meantime I'd be
> curious to see if others see the same behaviour under other platforms.
> 
> Meanwhile ... users of -ivreg2- should not use weights + robust under
> Stata 11 for now.  (-ranktest- is OK because it uses Mata rather than
> _robust.)

Mark discovered that -_robust- in Stata 11 is ignoring weights.  This problem
is limited to the direct use of -_robust- with weights; none of Stata's
estimation commands are affected by this problem; nor are any user-written
commands that allow robust variances estimates through -ml-.

This will be fixed in an ado-update that will be available tomorrow --
Saturday.

In Stata 11 -_robust- underwent two fundamental changes.

    1.  Parallelization.
    2.  Factor variables support.

The original -_robust- command is preserved under the name -_ROBUST-, but I
recommend that no one use that command directly.


--Jeff
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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