Learn R Programming

popbio (version 2.4.4)

lnorms: Generate random lognormal values for fertility rates

Description

Converts standard normal random values to lognormals with defined means and variances

Usage

lnorms(n, mean=2, var=1)

Arguments

n

number of observations

mean

mean value of the fertility rate

var

variance of the vital rate (not standard deviation)

Value

A vector of random lognormal values.

References

Morris, W. F., and D. F. Doak. 2002. Quantitative conservation biology: Theory and practice of population viability analysis. Sinauer, Sunderland, Massachusetts, USA.

See Also

stretchbetaval

Examples

Run this code
# NOT RUN {
lnorms(1)

 # Generate lognormal random fertilities
 # for a population of 1000 mature individuals with mean fertility of
 # 3 and inter-individual variance in fertility of 1.5.
 
 rndfert  <- lnorms(1000, 3,1.5)
summary(rndfert)
 hist(rndfert,40, main="Lognormal random fertilities", 
xlab="Fertility rate", col="blue")


 
# }

Run the code above in your browser using DataLab