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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 2775 views
  • 0 likes
  • 3 in conversation