DATA Step, Macro, Functions and more

RAND and RANNOR parameters

Reply
N/A
Posts: 0

RAND and RANNOR parameters

Hi everyone,

I have a question. Is possible to generate a random numbers from a normal and T distribution with a given minimum and maximum possible values?

For example, given the following parameters: a minimum possible value of -15, a maximum of 40, a mean of 9.5, and a variance of 50...

What is a correct SAS code so I can obtain a pseudo-population with these parameters using both the RANNOR and the RAND functions?

In other words how can I obtain a pseudo-population whose parameters can be similar to the "real population" under study using RANNOR and RAND functions?

Thanks in advance for your help.
PROC Star
Posts: 7,364

Re: RAND and RANNOR parameters

Caramel,

According to the following SUGI 31 paper, a macro exists that does what you are looking to accomplish:

http://www2.sas.com/proceedings/sugi31/198-31.pdf

However, I've been unable to obtain a copy of that macro. If anyone has it, I'd appreciate knowing how to find it.

Art
Trusted Advisor
Posts: 2,113

Re: RAND and RANNOR parameters

Art,

It looks like the author is still at Sanofi-Aventis. Have you tried to e-mail or call her directly.

Someone else was looking for the macro on SAS-L a couple of years ago, but had no follow-up.

Doc
PROC Star
Posts: 7,364

Re: RAND and RANNOR parameters

Doc,

Yes, I both saw that post and emailed the paper's author the same day as I posted my response to the current thread. If she resonds, I'll post the answer here.

Art
Ask a Question
Discussion stats
  • 3 replies
  • 166 views
  • 0 likes
  • 3 in conversation