Date: Wed, 30 Jul 1997 13:21:05 -0400
Reply-To: Rodney Sparapani <spara002@ACPUB.DUKE.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Rodney Sparapani <spara002@ACPUB.DUKE.EDU>
Organization: Duke University
Subject: Re: Generation of truncated Normal randon variables
Content-Type: text/plain; charset=iso-8859-1
Marcio Mello wrote:
>
> Hi , Sas-L :
> I need to generate normal random variables that are truncated at right (
> and at left ) . If someone knows a way of doing it , please contacte me .
>
> Marcio Corrêa de Mello
> marciom@inep.gov.br
OK. What if you used the normal cdf to find your lower and upper
probabilities, say l and u. Then you called RANUNI and created
a uniform random variable on the interval (l, u) via l+(u-l)*RANUNI;
therefore your random normal deviate is the PROBIT of this value:
PROBIT(l+(u-l)*RANUNI(seed))
--
Arrogance is bliss. Green Bay Packers
Rodney Sparapani 12 NFL Championships
Duke Clinical Research Institute Titletown, USA
Durham, North Carolina, USA Home of the Lombardi Trophy
1 2 3 4 5 6 7
1234567890123456789012345678901234567890123456789012345678901234567890