# lnorm.ml: ML Estimation for Lognormal Data with Non-detects In STAND: Statistical Analysis of Non-Detects

## Description

When an exposure measurement may be less than a detection limit closed form and exact methods have not been developed for the lognormal model. The maximum likelihood (ML) principle is used to develop an algorithm for parameter estimation, and to obtain large sample equivalents of confidence limits for the mean exposure level, the 100pth percentile, and the exceedance fraction. For a detailed discussion of assumptions, properties, and computational issues related to ML estimation see Cox and Hinkley (1979) and Cohen (1991).

## Usage

 `1` ```lnorm.ml(dd) ```

## Arguments

 `dd` An n by 2 matrix or data frame with x (exposure) variable in column 1, and det= 0 for non-detect or 1 for detect in Column 2

## Details

For notational convenience the m detected values x[i] are listed first followed by the nx[i] indicating non-detects, so that the data are x[i], i = 1, … , m, nx[i] i = m + 1, … ,n. If nx[i] is the same for each non-detect, this is referred to as a left singly censored sample (Type I censoring) and nx is the limit of detection(LOD). If the nx[i] are different, this is known as randomly (or progressively) left-censored data[see Cohen(1991) and Schmoyer et al (1996)]. In some situations a value of 0 is recorded when the exposure measurement is less than the LOD. In this situation, the value of nx[i] is the LOD indicating that x is in the interval (0, nx[i]). The probability density function for lognormal distribution is

g(x;μ,σ)= exp[-(log(x) - μ)^2/(2σ^2)] /[σ x √(2Π )]

where y = log(x) is normally distributed with mean μ and standard deviation σ [Atkinson and Brown (1969)]. The geometric mean of X is GM = exp(μ) and the geometric standard deviation is GSD = exp(σ). Strom and Stansberry (2000) provide a summary of these and other relationships for lognormal parameters. Assuming the data are a random sample from a lognormal distribution, the log of the likelihood function for the unknown parameters μ and σ given the data is

L (μ, σ )=∑ log[g(x; μ, σ )] + ∑ log[G (nx; μ, σ )],

where G(x; μ , σ) is the lognormal distribution function, i.e., G(nx; μ , σ) is the probability that x ≤ nx. The first summation is over i = 1, … , m, and the second is over i = m + 1, … ,n.

To test that the mean of X > L, Ho: E(X) > L at the α = 1- γ significance level a one-sided upper 100γ\% confidence limit can be used. One method for calculating this UCL is to use the censored data equivalent of Cox's direct method; i.e., calculate the ML estimate of φ =μ + [1/2] σ ^2, and var(φ) = var(μ + [1/2] σ ^2) where

var(φ )= var(μ ) + [1/4] var(σ^2)+cov(μ ,σ^2).

The ML estimator of E(X) is exp(φ), the 100γ {\%} LCL for E(X) is exp[φ - t var(φ )], and the 100γ\% UCL for E(x) is exp[φ + t var(φ )], where t = t(γ , m-1). The resulting confidence interval (LCL, UCL) has confidence level 100(2γ -1)\%. An equivalent procedure is to estimate φ = μ + [1/2] σ^2 and its standard error directly, i.e., by maximizing the log-likelihood with parameters μ + [1/2]σ^2 and σ^2. ML estimates of μ , σ , φ , σ^2, estimates of their standard errors, and covariance terms are calculated.

## Value

A list with components:

 `mu` ML estimate of μ `sigma` ML estimate of σ `logEX` ML estimate of log of E(X) `SigmaSq` ML estimate of σ^2 `se.mu` ML estimate of standard error of μ `se.sigma` ML estimate of standard error of σ `se.logEX` ML estimate of standard error of log of E(X) `se.Sigmasq` ML estimate of standard error of σ^2 `cov.musig` ML estimate of cov(μ,σ) `m` number of detects `n` number of observations in the data set `m2log(L)` -2 times the log-likelihood function `convergence` convergence indicator from `optim`

## Note

Local function `ndln` is called by `optim` for `mu` and `sigma` and local function `ndln2` is called by `optim` for `logEX` and `Sigmasq`.

E. L. Frome

## References

Cohen, A. C. (1991), Truncated and Censored Samples, Marcel Decker, New York

Cox, D. R. and D. V. Hinkley (1979), Theoretical Statistics, Chapman and Hall, New York.

Frome, E. L. and Wambach, P. F. (2005), "Statistical Methods and Software for the Analysis of Occupational Exposure Data with Non-Detectable Values," ORNL/TM-2005/52,Oak Ridge National Laboratory, Oak Ridge, TN 37830. Available at: http://www.csm.ornl.gov/esh/aoed/ORNLTM2005-52.pdf

`optim`, `efraction.ml`, `percentile.ml`
 ```1 2 3 4 5 6``` ```# Calculate MLE for Example 2 in ORNLTM2005-52 data(beTWA) mle.TWA<- unlist(lnorm.ml(beTWA)) # ML for Be monitoring data mle.TWA[1:4] # ML estimates of parameters mle.TWA[5:8] # Standard errors of ML estimates mle.TWA[9:13] # additional results from lnorm.ml ```