# Re: st:normal linear (mis)scaling

 From "D.Christodoulou" To statalist@hsphsun2.harvard.edu Subject Re: st:normal linear (mis)scaling Date Thu, 05 Aug 2004 16:13:15 +0100

```Nick,

The logit is something that I haven't thought about, and thanks for
pointing it out.
And yes, (-1,1) will do just fine... even though I imagine that you
wouldn't mind the challenge of finding somehting for [-1,1]. :-)

many thanks Nick, problem solved
Dimitris

Nick Cox wrote:
>
> . help mathfun
>
> indicates some functions with bounded range.
> Then use some linear re-expression to suit.
>
> 2 * invlogit(x) - 1
>
> maps to (-1,1). Now tell me that it _really_
> has to be [-1,1] not (-1,1)....
>
> Nick
> n.j.cox@durham.ac.uk
>
> > -----Original Message-----
> > From: owner-statalist@hsphsun2.harvard.edu
> > [mailto:owner-statalist@hsphsun2.harvard.edu]On Behalf Of
> > D.Christodoulou
> > Sent: 05 August 2004 14:23
> > To: statalist@hsphsun2.harvard.edu
> > Subject: Re: st:normal linear (mis)scaling
> >
> >
> > Nick,
> >
> > 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.
> >
> > thanks again,
> > Dimitris
> >
> > 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
> > >
> > > Nick
> > > n.j.cox@durham.ac.uk
> > >
> > > D.Christodoulou
> > > >
>
> *
> *   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/

--
---------------------------------------------
Dimitris Christodoulou
Teaching and Research Associate
School for Business and Regional Development
University of Wales, Bangor
Hen Coleg
LL57 2DG Bangor
UK
e-mail: D.Christodoulou@bangor.ac.uk
---------------------------------------------
*
*   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/
```