Bookmark and Share

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


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

RE: st: -robvar- and number of degrees of freedom


From   Garry Anderson <[email protected]>
To   [email protected]
Subject   RE: st: -robvar- and number of degrees of freedom
Date   Mon, 06 Sep 2010 15:57:15 +1000

Many thanks to Nick and Bobby for the workarounds and scheduled fix.

Cheers, Garry
 

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Roberto G.
Gutierrez, StataCorp
Sent: Saturday, 4 September 2010 12:30 AM
To: [email protected]
Subject: Re: st: -robvar- and number of degrees of freedom

Garry Anderson <[email protected]> writes:

> The -robvar- command does not seem to be reporting the correct degrees

> of freedom.

> . webuse auto
> (1978 Automobile Data)

> . robvar mpg,by(rep78)

>      Repair |      Summary of Mileage (mpg)
> Record 1978 |        Mean   Std. Dev.       Freq.
> ------------+------------------------------------
>           1 |          21   4.2426407           2
>           2 |      19.125   3.7583241           8
>           3 |   19.433333   4.1413252          30
>           4 |   21.666667   4.9348699          18
>           5 |   27.363636   8.7323849          11
> ------------+------------------------------------
>       Total |   21.289855   5.8664085          69

> W0  =  4.7219575   df(5, 68)     Pr > F = 0.00092356
> 
> W50 =  3.2906157   df(5, 68)     Pr > F = 0.01014559
> 
> W10 =  4.9744717   df(5, 68)     Pr > F = 0.00061062

> I would have expected the 5 df to be 4 df because there are 5 groups.

and Nick Cox <[email protected]> responds:

> My guess is that -robvar- is not marking out missings on the -by()- 
> variable, which are falsely included in the calculation of groups. If 
> you pursue a simple experiment the correct answer follows.

[...]

Nick also asserts later that -robvar- needs fixing, which it does.  The
fix will be in the next ado file update.

--Bobby
[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/

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index