Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st:normal linear (mis)scaling


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st:normal linear (mis)scaling
Date   Thu, 5 Aug 2004 16:00:08 +0100

No, the methods are not the same. Your 
exclusion will give fairly sharp edges, 
mine not so. Sharp edges are less
plausible in my experience. Perhaps
that is irrelevant for your purpose; but the methods are
not the same. 

Nick 
n.j.cox@durham.ac.uk 

 D.Christodoulou
> 
> thanks for your reply. In the same sense I can use:
> - histogram normal if normal >= -0.2 | normal <=-0.8 -
> to remove the exact bit that I want.
> 
> However, it is essential for this distribution to have bounds in the
> interval [-1,1].
> How to I restrict the random observations to be generated into this
> interval.
> 
> Nick Cox wrote:
> > 
> > I would generate lots of values from a Gaussian
> > and then take a big bite out of it, with some
> > randomness about the biting.
> > 
> > . set obs 1000
> > . gen normal = invnorm(uniform())
> > . qnorm normal
> > . histogram normal if (abs(normal) * uniform()) > 0.5
> > . histogram normal if (abs(normal) * uniform()) > 0.6
> > 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index