BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I want to confirm if the following is a correct form to generate random numbers coming from a lognormal distribution with a threshold parameter of 10,000, scale parameter of 9.0 and shape parameter of 0.8:

x=10000+exp(9+0.8*rannor(123))

Is there another way to do this?
2 REPLIES 2
Lea12345
Calcite | Level 5
What a pitty that zomorales didn´t get an answer! I have a problem regarding lognormal random numbers too:

Does anyone know how to generate random numbers coming from a lognormal distribution, when this resulting lognormal distribution should have a certain mean and variance?

I think it works like zomorales suggested it. But I don´t know how to set the scale and shape parameter to get a certain mean and variance for x.
Doc_Duke
Rhodochrosite | Level 12
Look at the RAND function in 9.2; it has a lognormal option.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2207 views
  • 0 likes
  • 3 in conversation