Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   rgutierrez@stata.com (Roberto G. Gutierrez, StataCorp)
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: -robvar- and number of degrees of freedom
Date   Fri, 03 Sep 2010 09:30:04 -0500

Garry Anderson <g.anderson@unimelb.edu.au> 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 <n.j.cox@durham.ac.uk> 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
rgutierrez@stata.com
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index