mle_lnorm {dvmisc} | R Documentation |
Maximum Likelihood Estimation for X[1], ..., X[n] ~ Lognormal(mu, sigsq)
Description
Performs maximization via nlminb
. mu and sigsq
correspond to meanlog and sdlog^2 in Lognormal
.
Usage
mle_lnorm(x, mu = NULL, sigsq = NULL, estimate_var = FALSE, ...)
Arguments
x |
Numeric vector. |
mu |
Numeric value specifying known mu. |
sigsq |
Numeric value specifying known sigsq. |
estimate_var |
Logical value for whether to return Hessian-based variance-covariance matrix. |
... |
Additional arguments to pass to |
Value
List containing:
Numeric vector of parameter estimates.
Variance-covariance matrix (if
estimate_var = TRUE
).Returned
nlminb
object from maximizing the log-likelihood function.Akaike information criterion (AIC).
Examples
# Generate 1,000 values from Lognormal(0.5, 1) and estimate mu and sigsq
set.seed(123)
x <- rlnorm(1000, meanlog = 0.5, sdlog = sqrt(1))
mle_lnorm(x)
[Package dvmisc version 1.1.4 Index]