Statalist


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

Re: st: RE: Re: Examining sampling distribution


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: RE: Re: Examining sampling distribution
Date   Tue, 17 Nov 2009 14:49:36 +0000 (GMT)

--- Babak Oskooei wrote:
> My question is how I can add a curve of Chi2 distribution
> with 1 df to the histogram of the sampling distribution of
> my statistic.

--- On Tue, 17/11/09, Nick Cox wrote:
> But there is a much, much, much better way for you to
> proceed. -qchi- and -pchi- are built-in commands for
> your exact purpose 

I agree with Nick that a histogram with a theoretical 
curve overlaid is not the best way to go. An alternative
that may look more familiar is the hanging rootogram.
(examples of these graphs can be seen here: 
http://www.maartenbuis.nl/software/hangroot.html )

The idea behind the hanging rootogram is that the bars
"hang" from the theoretical distribution rather than 
"stand" on the x-axis. This way deviations from the
theoretical curve are visible as deviation from a 
horizontal line, which makes it much easier to spot
patterns in these deviations than in the regular 
histogram where they are represented as deviations 
from a curve. Moreover, by using the square root scale
for the frequencies, any patterns in the tails 
become more visible.

In the current version the Chi square distribution is
not implemented, nor is it possible to fix the df of
the theoretical distribution to 1, as you requested.
I just implemented both options and sent the updated
files to Kit Baum so he can put it on SSC. So that 
should be available shortly.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------





      

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