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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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