Programming the statistical procedures from SAS

Generating lognormal random numbers

Reply
N/A
Posts: 0

Generating lognormal random numbers

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?
N/A
Posts: 1

Re: Generating lognormal random numbers

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.
Trusted Advisor
Posts: 2,114

Re: Generating lognormal random numbers

Look at the RAND function in 9.2; it has a lognormal option.
Ask a Question
Discussion stats
  • 2 replies
  • 596 views
  • 0 likes
  • 3 in conversation