[R-sig-teaching] Sample from Log-Normal Distribution

Steven Stoline sstoline at gmail.com
Mon Jul 13 19:11:28 CEST 2015


Dear Michael:

Thank you very much for your help.

Now it it is clear, meanlog and sdlog in the rlnorm are the mean and
standard deviation of the normal distribution.

once again many thanks
steve


On Sun, Jul 12, 2015 at 11:15 PM, Michael Weylandt <
michael.weylandt at gmail.com> wrote:

> You can test this yourself quite easily:
>
> x <- rlnorm(1e6, meanlog=4)
> mean(x)
> mean(log(x))
>
> Cheers,
> Michael
>
> > On Jul 12, 2015, at 7:40 PM, Steven Stoline <sstoline at gmail.com> wrote:
> >
> > Dear All:
> >
> > I need someone to clarify the value of the *meanlog* and *stlog* used in
> > the function *rlnorm* when you sample from log-normal distribution.
> >
> > rlnorm(n, meanlog = 0, sdlog = 1)
> >
> >
> >
> > *For example: *y<- rlnorm(25, meanlog = 5, sdlog = 1)
> >
> >
> > Is the value of the meanlog, *5*, the mean of the log-normal
> distribution.
> > Similarly, is the value of the *sdlog*, *1*, the standard deviation of
> the
> > log-normal distribution.
> >
> > or 5 and 1 are the mean and standard deviation of the normal distribution
> > of x = log(y) ~N(mean =5, var = 1)
> >
> > with many thanks
> >
> > steve
> >
> >
> > --
> > Steven M. Stoline
> > 1123 Forest Avenue
> > Portland, ME 04112
> > sstoline at gmail.com
> >
> >    [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-teaching at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-teaching
>



-- 
Steven M. Stoline
1123 Forest Avenue
Portland, ME 04112
sstoline at gmail.com

	[[alternative HTML version deleted]]



More information about the R-sig-teaching mailing list