mle_lnorm_lnorm {dvmisc} | R Documentation |
Each observation is assumed to be the product of a Lognormal(mu1, sigsq1) and
Lognormal(mu2, sigsq2) random variable, with mu2 and sigsq2 known. Performs
maximization via nlminb
. mu and sigsq correspond to
meanlog and sdlog^2 in Lognormal
.
mle_lnorm_lnorm(x, mu2 = NULL, sigsq2 = NULL, estimate_var = FALSE,
...)
x |
Numeric vector. |
mu2 |
Numeric value specifying known mu2. |
sigsq2 |
Numeric value specifying known sigsq2. |
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) x Lognormal(0.75, 1.5) and
# estimate parameters based on known mu and sigsq for one of them
set.seed(123)
x <- rlnorm(1000, 0.5, sqrt(1)) * rlnorm(1000, 0.75, sqrt(1.5))
mle_lnorm_lnorm(x, mu2 = 0.75, sigsq2 = 1.5)