lnorm_est | R Documentation |
function to get the method of moment estimate(s) of log-normal distribution
lnorm_est(
data,
unknown = c("meanlog", "sdlog", "both"),
meanlog = NULL,
sdlog = NULL,
plot = TRUE,
curvecol = "red",
...
)
data |
A numeric vector. |
unknown |
A character string specifying which parameter is (are) unknown to the user. |
meanlog , sdlog |
mean and standard deviation of the distribution on the log scale. |
plot |
logical which controls whether the histogram of the data along with the density curve of the theoretical log normal distribution with the estimated parameters. |
curvecol |
color of the theoretical density curve |
... |
additional plotting parameters |
the estimated parameters by the method of moments of the data assuming the underlying distribution is log normal distribution
lnorm_est(rlnorm(1000),unknown="meanlog",sdlog=1)#meanlog unknown, but sdlog known
lnorm_est(rlnorm(1000),unknown="sdlog",meanlog=0)#sdlog unknown, but meanlog known
lnorm_est(rlnorm(1000),unknown="both")#both will be estimated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.