Generate random numbers from a lognormal distribution, rescaled to have user-specified population mean and standard deviation.
Arguments
- n
The number of random numbers to generate.
- mui
The parameter
mui
to be used bystats::rlnorm()
.- sigma
The parameter
sigma
to be used bystats::rlnorm()
.- rev
If TRUE, the distribution is revered to generate a negatively skewed distribution. Default is FALSE.
- pmean
Population mean.
- psd
Population standard deviation.
Details
First, specify the parameter,
mui
and sigma
, and the
desired population mean and standard
deviation. The random numbers, drawn
from a lognormal distribution by
stats::rlnorm()
, will then be
rescaled with the desired population
mean and standard.