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 on April 23, and its replacement, is already up and running.

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

Re: st: qnorm

From   Maarten Buis <>
Subject   Re: st: qnorm
Date   Mon, 5 Mar 2012 10:33:56 +0100

On Mon, Mar 5, 2012 at 10:03 AM, Nick Cox wrote:
> 1. Simulate several samples from a distribution with the same mean and
> standard deviation (or more generally an appropriate mean and standard
> deviation) and use the resulting portfolio of plots in assessing what
> kind of variability is to be expected.

An easy way to do so is to use the -margdistfit- package, which you
can install by typing in Stata -ssc install margdistfit-. The default
is actually to first sample the mean and the standard deviation from
its sampling distribution and than sample a new variable with those
sampled means and standard deviation. I suspect that this makes sense
in most cases, though I also suspect that it won't matter much. If you
want to do exactly what Nick proposes you can add the -noparsamp-

Here is an example of what such a graph would look like:

*-------- begin example -----------
sysuse auto, clear
reg mpg
margdistfit, qq name(qq)
margdistfit, pp name(pp)
margdistfit, hangroot name(hangr)
margdistfit, cumul name(cumul)
*--------- end example ------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index