mle_lnorm_lnorm: Maximum Likelihood Estimation for X[1], ..., X[n] ~...

Description Usage Arguments Value Examples

View source: R/mle_lnorm_lnorm.R

Description

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.

Usage

1
mle_lnorm_lnorm(x, mu2 = NULL, sigsq2 = NULL, estimate_var = FALSE, ...)

Arguments

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 nlminb.

Value

List containing:

  1. Numeric vector of parameter estimates.

  2. Variance-covariance matrix (if estimate_var = TRUE).

  3. Returned nlminb object from maximizing the log-likelihood function.

  4. Akaike information criterion (AIC).

Examples

1
2
3
4
5
# 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)

vandomed/dvmisc documentation built on Oct. 2, 2020, 9:50 p.m.