mle_lnorm {dvmisc} | R Documentation |
Performs maximization via nlminb
. mu and sigsq
correspond to meanlog and sdlog^2 in Lognormal
.
mle_lnorm(x, mu = NULL, sigsq = NULL, estimate_var = FALSE, ...)
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 |
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).
# 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)