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: qnorm


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   Re: st: qnorm
Date   Mon, 5 Mar 2012 09:16:53 -0500

Thank you for pointing us to -margdistfit- and -hangroot- from the SSC
archives.  Unfortunately I encountered an error when running your
example.  Using the code below (copied from your posting) I get an
error (shown below the program code):

sysuse auto, clear
reg mpg
margdistfit, hangroot name(hangr)

varlist required when hangroot is not preceded by
betafit, paretofit, lognfit, weibullfit, gammafit,
gumbelfit, invgammafit, invgaussfit, dagumfit,
smfit, gb2fit, fiskfit, or gevfit
and these models need to be estimated without covariates
r(100);

I am using version 1.2.0 13Dec2011 of margdistfit and used -adoupdate-
to update my user written programs.

The following example from the -hangroot- help file produces the same error:

preserve
set seed 12345
drop _all
set obs 500
gen x = runiform() < .5
gen y = -2 + 4*x + rnormal()
regress y x
margdistfit, hangroot(jitter(5))
restore


Thank you for your help.

Best,
Alan


On Mon, Mar 5, 2012 at 4:33 AM, Maarten Buis <[email protected]> wrote:
> 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-
> option.
>
> 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:
> http://www.maartenbuis.nl/example_faq )
>
> 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/

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