# AW: st: RE: Re: Examining sampling distribution

 From "Martin Weiss" To Subject AW: st: RE: Re: Examining sampling distribution Date Tue, 17 Nov 2009 14:48:31 +0100

```<>

*************
ssc d DPPLOT
findit dpplot
************

HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Babak Oskooei
Gesendet: Dienstag, 17. November 2009 14:49
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: RE: Re: Examining sampling distribution

Dear Nick,

Thanks for your email and help. I am following your first suggestion to get
what I want. I am using gammaden function to draw the chi2 curve that I need
since Stata does not have similar function for chi2 distribution, i.e.
chi2den. I will let you know when I successfully completed the task.

Nick, I have a further question if you do not mind. I came across DPPLOT
program written by you. Could you please let me know where I can obtain this
from.

Kind regards

Babak

--- On Tue, 11/17/09, Nick Cox <n.j.cox@durham.ac.uk> wrote:

> From: Nick Cox <n.j.cox@durham.ac.uk>
> Subject: st: RE: Re: Examining sampling distribution
> To: statalist@hsphsun2.harvard.edu
> Date: Tuesday, November 17, 2009, 5:43 AM
> You could add the curve of a function
> by using -twoway function- in
> conjunction with your histogram command. If it's
> -histogram-, you do
> that via -addplot()-. If it's -twoway histogram-, you do
> that via
> superimposition using the () or || notation.
>
> But there is a much, much, much better way for you to
> proceed. -qchi-
> and -pchi- are built-in commands for your exact purpose
> that allow you
> to focus on the overall form of the distribution without
> any arbitrary
> decisions about bin width (or possibly origin, although
> that presumably
> is 0 in your case) and without the contortions of comparing
> bin heights
> with a nonlinear curve. You should compare plots with a
> portfolio of
> similar plots showing random draws from a chi-square(1).
>
> My prejudice is that a good or lousy fit will be
> self-evident on such
> plots. Otherwise, consider the usual menagerie of
> Kolmogorov-Smirnov,
> etc.
> The portfolio technique provides an informal test.
>
> Nick
> n.j.cox@durham.ac.uk
>
>
> Babak Oskooei
>
> I have a question with respect to examining the sampling
> distribution
> visually and using statistical tests. I have carried out
> simulations in
> Stata with 5,000 replicates and obtained the statistic of
> interest. The
> sampling distribution of this statistics should be
> distributed as
> Chi-squared with 1 df. I would like to test this visually
> and unsing
> ststistical tests.
>
> 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.
> I know that
> in many softwares this is possible but I do not know how to
> do this in
> Stata. I found many options like kdensity in the histogram
> command but
> not an option which fits a curve with a specific
> distribution to my
> histogram. Also, I would like to know the name of the
> command in Stata
> which I tests this statistically.
>
>
> *
> *   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/

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