library(dplyr) library(knitr)
The lognormal distribution is expressed via its mu and sigma parameters. However, most interpretations of sample data examines the mean and standard deviation. It is straightforward to translate from one to the other.
lstParams <- LognormalParams(10e3, 1.5) lstParams$mu lstParams$sigma
sample_data <- rlnorm(500, lstParams$mu, lstParams$sigma) dfL <- CalcLognormalLikelihood(sample_data, c(9e3, 11e3), c(1, 2))
dfL %>% head(5) %>% knitr::kable()
library(ggplot2) plt <- ggplot(dfL, aes(Mean, CV, z = Likelihood)) + geom_contour(bins=100) # + geom_raster(aes(fill = Likelihood)) plt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.