BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
3 REPLIES 3
art297
Opal | Level 21
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
Doc_Duke
Rhodochrosite | Level 12
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
art297
Opal | Level 21
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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 895 views
  • 0 likes
  • 3 in conversation