elnormAltCensored(x, censored, method = "mle", censoring.side = "left",
ci = FALSE, ci.method = "profile.likelihood", ci.type = "two-sided",
conf.level = 0.95, n.bootstraps = 1000, pivot.statistic = "z", ...)
NA
), undefined (NaN
), and
infinite (Inf
, -Inf
) values are allowed but will be removed.x
are censored.
This must be the same length as x
. If the mode of censored
is
"logical"
, TRUE
values correspond to elements of "mle"
(maximum likelihood; the default),
"qmvue"
(quasi minimum variance unbiased estimation)
"bcml
"left"
(the default) and "right"
.ci=FALSE
."profile.likelihood"
(profile likelihood; the default),
"cox"
(Cox's approximation),
"two-sided"
(the default), "lower"
, and
"upper"
. This argument is ignored if ci=FALSE
.conf.level=0.95
. This argument is ignored if
ci=FALSE
.ci.type="bootstrap"
. This
argument is ignored if ci=FALSE
and/or ci.method
does not
equal ci.method
is equal to
"delta"
, "cox"
, or "normal.approx"
(see the DETAILSprob.method
. Character string indicating what method to use to
compute the plotting positions (empirical probabilities) whenmethod
is one of"impute.w.qq.reg"
"estimateCensored"
containing the estimated parameters
and other information. See estimateCensored.object
for details.x
or censored
contain any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let $\underline{x}$ be a vector of $n$ observations from a
lognormal distribution with
parameters mean=
$\theta$ and cv=
$\tau$. Let $\eta$ denote the
standard deviation of this distribution, so that $\eta = \theta \tau$. Set
$\underline{y} = log(\underline{x})$. Then $\underline{y}$ is a vector of observations
from a normal distribution with parameters mean=
$\mu$ and sd=
$\sigma$.
See the help file for LognormalAlt for the relationship between
$\theta, \tau, \eta, \mu$, and $\sigma$.
Let $\underline{x}$ denote a vector of $N$ observations from a
lognormal distribution with parameters
mean=
$\theta$ and cv=
$\tau$. Let $\eta$ denote the
standard deviation of this distribution, so that $\eta = \theta \tau$. Set
$\underline{y} = log(\underline{x})$. Then $\underline{y}$ is a
vector of observations from a normal distribution with parameters
mean=
$\mu$ and sd=
$\sigma$. See the help file for
LognormalAlt for the relationship between
$\theta, \tau, \eta, \mu$, and $\sigma$.
Assume $n$ ($0 < n < N$) of the $N$ observations are known and
$c$ ($c=N-n$) of the observations are all censored below (left-censored)
or all censored above (right-censored) at $k$ fixed censoring levels
$$T_1, T_2, \ldots, T_k; \; k \ge 1 \;\;\;\;\;\; (1)$$
For the case when $k \ge 2$, the data are said to be Type I
multiply censored. For the case when $k=1$,
set $T = T_1$. If the data are left-censored
and all $n$ known observations are greater
than or equal to $T$, or if the data are right-censored and all $n$
known observations are less than or equal to $T$, then the data are
said to be Type I singly censored (Nelson, 1982, p.7), otherwise
they are considered to be Type I multiply censored.
Let $c_j$ denote the number of observations censored below or above censoring
level $T_j$ for $j = 1, 2, \ldots, k$, so that
$$\sum_{i=1}^k c_j = c \;\;\;\;\;\; (2)$$
Let $x_{(1)}, x_{(2)}, \ldots, x_{(N)}$ denote the mean=
$\theta$ and
cv=
$\tau$ are computed. The approach is to first compute estimates of
$\theta$ and $\eta^2$ (the mean and variance of the lognormal distribution),
say $\hat{\theta}$ and $\hat{\eta}^2$, then compute the estimate of the cv
$\tau$ by $\hat{\tau} = \hat{\eta}/\hat{\theta}$.
Maximum Likelihood Estimation (method="mle"
)
The maximum likelihood estimators of $\theta$, $\tau$, and $\eta$ are
computed as:
$$\hat{\theta}_{mle} = exp(\hat{\mu}_{mle} + \frac{\hat{\sigma}^2_{mle}}{2}) \;\;\;\;\;\; (3)$$
$$\hat{\tau}_{mle} = [exp(\hat{\sigma}^2_{mle}) - 1]^{1/2} \;\;\;\;\;\; (4)$$
$$\hat{\eta}_{mle} = \hat{\theta}_{mle} \; \hat{\tau}_{mle} \;\;\;\;\;\; (5)$$
where $\hat{\mu}_{mle}$ and $\hat{\sigma}_{mle}$ denote the maximum
likelihood estimators of $\mu$ and $\sigma$. See the help for for
enormCensored
for information on how $\hat{\mu}_{mle}$ and
$\hat{\sigma}_{mle}$ are computed.
Quasi Minimum Variance Unbiased Estimation Based on the MLE's (method="qmvue"
)
The maximum likelihood estimators of $\theta$ and $\eta^2$ are biased.
Even for complete (uncensored) samples these estimators are biased
(see equation (12) in the help file for elnormAlt
).
The bias tends to 0 as the sample size increases, but it can be considerable for
small sample sizes.
(Cohn et al., 1989, demonstrate the bias for complete data sets.)
For the case of complete samples, the minimum variance unbiased estimators (mvue's)
of $\theta$ and $\eta^2$ were derived by Finney (1941) and are discussed in
Gilbert (1987, pp.164-167) and Cohn et al. (1989). These estimators are computed as:
$$\hat{\theta}_{mvue} = e^{\bar{y}} g_{n-1}(\frac{s^2}{2}) \;\;\;\;\;\; (6)$$
$$\hat{\eta}^2_{mvue} = e^{2 \bar{y}} {g_{n-1}(2s^2) - g_{n-1}[\frac{(n-2)s^2}{n-1}]} \;\;\;\;\;\; (7)$$
where
$$\bar{y} = \frac{1}{n} \sum_{i=1}^n y_i \;\;\;\;\;\; (8)$$
$$s^2 = \frac{1}{n-1} \sum_{i=1}^n (y_i - \bar{y})^2 \;\;\;\;\;\; (9)$$
$$g_m(z) = \sum_{i=0}^\infty \frac{m^i (m+2i)}{m(m+2) \cdots (m+2i)} (\frac{m}{m+1})^i (\frac{z^i}{i!}) \;\;\;\;\;\; (10)$$
(see the help file for elnormAlt
).
For Type I censored samples, the quasi minimum variance unbiased estimators
(qmvue's) of $\theta$ and $\eta^2$ are computed using equations (6) and (7)
and estimating $\mu$ and $\sigma$ with their mle's (see
elnormCensored
).
For singly censored data, this is apparently the LM method of Gilliom and Helsel
(1986, p.137) (it is not clear from their description on page 137 whether their
LM method is the straight method="mle"
described above or
method="qmvue"
described here). This method was also used by
Newman et al. (1989, p.915, equations 10-11).
For multiply censored data, this is apparently the MM method of Helsel and Cohn
(1988, p.1998). (It is not clear from their description on page 1998 and the
description in Gilliom and Helsel, 1986, page 137 whether Helsel and Cohn's (1988)
MM method is the straight method="mle"
described above or method="qmvue"
described here.)
Bias-Corrected Maximum Likelihood Estimation (method="bcmle"
)
This method was derived by El-Shaarawi (1989) and can be applied to complete or
censored data sets. For complete data, the exact relative bias of the mle of
the mean $\theta$ is given as:
$$B_{mle} = \frac{E[\hat{\theta}_{mle}]}{\theta} = exp[\frac{-(n-1)\sigma^2}{2n}] (1 - \frac{\sigma^2}{n})^{-(n-1)/2} \;\;\;\;\;\; (11)$$
(see equation (12) in the help file for elnormAlt
).
For the case of complete or censored data, El-Shaarawi (1989) proposed the
following method="bcmle"
.
Imputation Using Quantile-Quantile Regression (method ="impute.w.qq.reg"
)
This method involves using quantile-quantile regression on the log-transformed
observations to fit a regression line (and thus initially estimate the mean
$\mu$ and standard deviation $\sigma$ in log-space), imputing the
log-transformed values of the $c$ censored observations by predicting them
from the regression equation, transforming the log-scale imputed values back to
the original scale, and then computing the method of moments estimates of the
mean and standard deviation based on the observed and imputed values.
The steps are:
ppointsCensored
.
prob.method="hirsch-stedinger"
and
plot.pos.con=0
).
The argument plot.pos.con
(see the entry for ...in the ARGUMENTS
section above) determines the value of the plotting positions computed in
equations (14) and (15) when method
equals "hirsch-stedinger"
or
"michael-schucany"
. The default value is plot.pos.con=0.375
.
See the help file for ppointsCensored
for more information.
The arguments lb.impute
and ub.impute
(see the entry for ...in
the ARGUMENTS section above) determine the lower and upper bounds for the
imputed values. Imputed values smaller than lb.impute
are set to this
value. Imputed values larger than ub.impute
are set to this value.
The default values are lb.impute=0
and ub.impute=Inf
.
Imputation Using Quantile-Quantile Regression Including the Censoring Level
(method ="impute.w.qq.reg.w.cen.level"
)
This method is only available for sinlgy censored data. This method was
proposed by El-Shaarawi (1989), which he denoted as the Modified LR Method.
It is exactly the same method as imputation
using quantile-quantile regression (method="impute.w.qq.reg"
), except that
the quantile-quantile regression includes the censoring level. For left singly
censored data, the modification involves adding the point
$[\Phi^{-1}(p_c), T]$ to the plot before fitting the least-squares line.
For right singly censored data, the point $[\Phi^{-1}(p_{n+1}), T]$
is added to the plot before fitting the least-squares line.
Imputation Using Maximum Likelihood (method ="impute.w.mle"
)
This method is only available for sinlgy censored data.
This is exactly the same method as imputation with quantile-quantile regression
(method="impute.w.qq.reg"
), except that the maximum likelihood method
(method="mle"
) is used to compute the initial estimates of the mean and
standard deviation. In the context of lognormal data, this method is discussed
by El-Shaarawi (1989), which he denotes as the Modified Maximum Likelihood Method.
Setting Censored Observations to Half the Censoring Level (method="half.cen.level"
)
This method is applicable only to left censored data that is bounded below by 0.
This method involves simply replacing all the censored observations with half their
detection limit, and then computing the usual moment estimators of the mean and
variance. That is, all censored observations are imputed to be half the detection
limit, and then Equations (17) and (18) are used to estimate the mean and varaince.
This method is included only to allow comparison of this method to other methods.
Setting left-censored observations to half the censoring level is not
recommended. In particular, El-Shaarawi and Esterby (1992) show that these
estimators are biased and inconsistent (i.e., the bias remains even as the sample
size increases).
CONFIDENCE INTERVALS
This section explains how confidence intervals for the mean $\theta$ are
computed.
Likelihood Profile (ci.method="profile.likelihood"
)
This method was proposed by Cox (1970, p.88), and Venzon and Moolgavkar (1988)
introduced an efficient method of computation. This method is also discussed by
Stryhn and Christensen (2003) and Royston (2007).
The idea behind this method is to invert the likelihood-ratio test to obtain a
confidence interval for the mean $\theta$ while treating the coefficient of
variation $\tau$ as a nuisance parameter.
For Type I left censored data, the likelihood function is given by:
$$L(\theta, \tau | \underline{x}) = {N \choose c_1 c_2 \ldots c_k n} \prod_{j=1}^k [F(T_j)]^{c_j} \prod_{i \in \Omega} f[x_{(i)}] \;\;\;\;\;\; (19)$$
where $f$ and $F$ denote the probability density function (pdf) and
cumulative distribution function (cdf) of the population. That is,
$$f(t) = \phi(\frac{t-\mu}{\sigma}) \;\;\;\;\;\; (20)$$
$$F(t) = \Phi(\frac{t-\mu}{\sigma}) \;\;\;\;\;\; (21)$$
where
$$\mu = log(\frac{\theta}{\sqrt{\tau^2 + 1}}) \;\;\;\;\;\; (22)$$
$$\sigma = [log(\tau^2 + 1)]^{1/2} \;\;\;\;\;\; (23)$$
and $\phi$ and $\Phi$ denote the pdf and cdf of the standard normal
distribution, respectively (Cohen, 1963; 1991, pp.6, 50). For left singly
censored data, equation (3) simplifies to:
$$L(\mu, \sigma | \underline{x}) = {N \choose c} [F(T)]^{c} \prod_{i = c+1}^n f[x_{(i)}] \;\;\;\;\;\; (24)$$
Similarly, for Type I right censored data, the likelihood function is given by:
$$L(\mu, \sigma | \underline{x}) = {N \choose c_1 c_2 \ldots c_k n} \prod_{j=1}^k [1 - F(T_j)]^{c_j} \prod_{i \in \Omega} f[x_{(i)}] \;\;\;\;\;\; (25)$$
and for right singly censored data this simplifies to:
$$L(\mu, \sigma | \underline{x}) = {N \choose c} [1 - F(T)]^{c} \prod_{i = 1}^n f[x_{(i)}] \;\;\;\;\;\; (26)$$
Following Stryhn and Christensen (2003), denote the maximum likelihood estimates
of the mean and coefficient of variation by $(\theta^*, \tau^*)$.
The likelihood ratio test statistic ($G^2$) of the hypothesis
$H_0: \theta = \theta_0$ (where $\theta_0$ is a fixed value) equals the
drop in $2 log(L)$ between the ci.method="delta"
or ci.method="normal.approx"
)
An approximate $(1-\alpha)100%$ confidence interval for $\theta$ can be
constructed assuming the distribution of the estimator of $\theta$ is
approximately normally distributed. That is, a two-sided $(1-\alpha)100%$
confidence interval for $\theta$ is constructed as:
$$[\hat{\theta} - t_{1-\alpha/2, m-1}\hat{\sigma}_{\hat{\theta}}, \; \hat{\theta} + t_{1-\alpha/2, m-1}\hat{\sigma}_{\hat{\theta}}] \;\;\;\;\;\; (31)$$
where $\hat{\theta}$ denotes the estimate of $\theta$,
$\hat{\sigma}_{\hat{\theta}}$ denotes the estimated asymptotic standard
deviation of the estimator of $\theta$, $m$ denotes the assumed sample
size for the confidence interval, and $t_{p,\nu}$ denotes the $p$'th
quantile of Student's t-distribuiton with $\nu$
degrees of freedom. One-sided confidence intervals are computed in a
similar fashion.
The argument ci.sample.size
determines the value of $m$ (see
see the entry for ...in the ARGUMENTS section above).
When method
equals "mle"
, "qmvue"
, or "bcmle"
and the data are singly censored, the default value is the
expected number of uncensored observations, otherwise it is $n$,
the observed number of uncensored observations. This is simply an ad-hoc
method of constructing confidence intervals and is not based on any
published theoretical results.
When pivot.statistic="z"
, the $p$'th quantile from the
standard normal distribution is used in place of the
$p$'th quantile from Student's t-distribution.
Direct Normal Approximation Based on the Delta Method (ci.method="delta"
)
This method is usually applied with the maximum likelihood estimators
(method="mle"
). It should also work approximately for the quasi minimum
variance unbiased estimators (method="qmvue"
) and the bias-corrected maximum
likelihood estimators (method="bcmle"
).
When method="mle"
, the variance of the mle of $\theta$ can be estimated
based on the variance-covariance matrix of the mle's of $\mu$ and $\sigma$
(denoted $V$), and the delta method:
$$\hat{\sigma}^2_{\hat{\theta}} = (\frac{\partial \theta}{\partial \underline{\lambda}})^{'}_{\hat{\underline{\lambda}}} \hat{V} (\frac{\partial \theta}{\partial \underline{\lambda}})_{\hat{\underline{\lambda}}} \;\;\;\;\;\; (32)$$
where
$$\underline{\lambda}' = (\mu, \sigma) \;\;\;\;\;\; (33)$$
$$\frac{\partial \theta}{\partial \mu} = exp(\mu + \frac{\sigma^2}{2}) \;\;\;\;\;\; (34)$$
$$\frac{\partial \theta}{\partial \sigma} = \sigma exp(\mu + \frac{\sigma^2}{2}) \;\;\;\;\;\; (35)$$
(Shumway et al., 1989). The variance-covariance matrix $V$ of the mle's of
$\mu$ and $\sigma$ is estimated based on the inverse of the observed Fisher
Information matrix, formulas for which are given in Cohen (1991).
Direct Normal Approximation Based on the Moment Estimators (ci.method="normal.approx"
)
This method is valid only for the moment estimators based on imputed values
(i.e., method="impute.w.qq.reg"
or method="half.cen.level"
). For
these cases, the standard deviation of the estimated mean is assumed to be
approximated by
$$\hat{\sigma}_{\hat{\theta}} = \frac{\hat{\eta}}{\sqrt{m}} \;\;\;\;\;\; (36)$$
where, as already noted, $m$ denotes the assumed sample size.
This is simply an ad-hoc method of constructing confidence intervals and is not
based on any published theoretical results.
Cox's Method (ci.method="cox"
)
This method may be applied with the maximum likelihood estimators
(method="mle"
), the quasi minimum variance unbiased estimators
(method="qmvue"
), and the bias-corrected maximum likelihood estimators
(method="bcmle"
).
This method was proposed by El-Shaarawi (1989) and is an extension of the
method derived by Cox and presented in Land (1972) for the case of
complete data (see the explanation of ci.method="cox"
in the help file
for elnormAlt
). The idea is to construct an approximate
$(1-\alpha)100%$ confidence interval for the quantity
$$\beta = exp(\mu + \frac{\sigma^2}{2}) \;\;\;\;\;\; (37)$$
assuming the estimate of $\beta$
$$\hat{\beta} = exp(\hat{\mu} + \frac{\hat{\sigma}^2}{2}) \;\;\;\;\;\; (38)$$
is approximately normally distributed, and then exponentiate the confidence limits.
That is, a two-sided $(1-\alpha)100%$ confidence interval for $\theta$
is constructed as:
$$[ exp(\hat{\beta} - h), \; exp(\hat{\beta} + h) ]\;\;\;\;\;\; (39)$$
where
$$h = t_{1-\alpha/2, m-1}\hat{\sigma}_{\hat{\beta}} \;\;\;\;\;\; (40)$$
and $\hat{\sigma}_{\hat{\beta}}$ denotes the estimated asymptotic standard
deviation of the estimator of $\beta$, $m$ denotes the assumed sample
size for the confidence interval, and $t_{p,\nu}$ denotes the $p$'th
quantile of Student's t-distribuiton with $\nu$
degrees of freedom.
El-Shaarawi (1989) shows that the standard deviation of the mle of $\beta$ can
be estimated by:
$$\hat{\sigma}_{\hat{\beta}} = \sqrt{ \hat{V}_{11} + 2 \hat{\sigma} \hat{V}_{12} + \hat{\sigma}^2 \hat{V}_{22} } \;\;\;\;\;\; (41)$$
where $V$ denotes the variance-covariance matrix of the mle's of $\mu$ and
$\sigma$ and is estimated based on the inverse of the Fisher Information matrix.
One-sided confidence intervals are computed in a similar fashion.
Bootstrap and Bias-Corrected Bootstrap Approximation (ci.method="bootstrap"
)
The bootstrap is a nonparametric method of estimating the distribution
(and associated distribution parameters and quantiles) of a sample statistic,
regardless of the distribution of the population from which the sample was drawn.
The bootstrap was introduced by Efron (1979) and a general reference is
Efron and Tibshirani (1993).
In the context of deriving an approximate $(1-\alpha)100%$ confidence interval
for the population mean $\theta$, the bootstrap can be broken down into the
following steps:
n.bootstraps
(see the section ARGUMENTS above).
The default value ofn.bootstraps
is1000
.ecdfPlot
), and then create a confidence interval for$\theta$based on this estimated cdf.elnormAltCensored
calls the Rfunction quantile
to compute the empirical quantiles used in Equations (42)-(44).
The percentile method bootstrap confidence interval is only first-order
accurate (Efron and Tibshirani, 1993, pp.187-188), meaning that the probability
that the confidence interval will contain the true value of $\theta$ can be
off by $k/\sqrt{N}$, where $k$is some constant. Efron and Tibshirani
(1993, pp.184-188) proposed a bias-corrected and accelerated interval that is
second-order accurate, meaning that the probability that the confidence interval
will contain the true value of $\theta$ may be off by $k/N$ instead of
$k/\sqrt{N}$. The two-sided bias-corrected and accelerated confidence interval is
computed as:
$$[\hat{G}^{-1}(\alpha_1), \; \hat{G}^{-1}(\alpha_2)] \;\;\;\;\;\; (45)$$
where
$$\alpha_1 = \Phi[\hat{z}_0 + \frac{\hat{z}_0 + z_{\alpha/2}}{1 - \hat{a}(z_0 + z_{\alpha/2})}] \;\;\;\;\;\; (46)$$
$$\alpha_2 = \Phi[\hat{z}_0 + \frac{\hat{z}_0 + z_{1-\alpha/2}}{1 - \hat{a}(z_0 + z_{1-\alpha/2})}] \;\;\;\;\;\; (47)$$
$$\hat{z}_0 = \Phi^{-1}[\hat{G}(\hat{\theta})] \;\;\;\;\;\; (48)$$
$$\hat{a} = \frac{\sum_{i=1}^N (\hat{\theta}_{(\cdot)} - \hat{\theta}_{(i)})^3}{6[\sum_{i=1}^N (\hat{\theta}_{(\cdot)} - \hat{\theta}_{(i)})^2]^{3/2}} \;\;\;\;\;\; (49)$$
where the quantity $\hat{\theta}_{(i)}$ denotes the estimate of $\theta$ using
all the values in $\underline{x}$ except the $i$'th one, and
$$\hat{\theta}{(\cdot)} = \frac{1}{N} \sum_{i=1}^N \hat{\theta_{(i)}} \;\;\;\;\;\; (50)$$
A one-sided lower confidence interval is given by:
$$[\hat{G}^{-1}(\alpha_1), \; \infty] \;\;\;\;\;\; (51)$$
and a one-sided upper confidence interval is given by:
$$[0, \; \hat{G}^{-1}(\alpha_2)] \;\;\;\;\;\; (52)$$
where $\alpha_1$ and $\alpha_2$ are computed as for a two-sided confidence
interval, except $\alpha/2$ is replaced with $\alpha$ in Equations (51) and (52).
The constant $\hat{z}_0$ incorporates the bias correction, and the constant
$\hat{a}$ is the acceleration constant. The term ci.method="bootstrap"
, the function elnormAltCensored
computes both
the percentile method and bias-corrected and accelerated method bootstrap confidence
intervals.
This method of constructing confidence intervals for censored data was studied by
Shumway et al. (1989).LognormalAlt
, elnormAlt
,
elnormCensored
, enormCensored
,
estimateCensored.object
.# Chapter 15 of USEPA (2009) gives several examples of estimating the mean
# and standard deviation of a lognormal distribution on the log-scale using
# manganese concentrations (ppb) in groundwater at five background wells.
# In EnvStats these data are stored in the data frame
# EPA.09.Ex.15.1.manganese.df.
# Here we will estimate the mean and coefficient of variation
# ON THE ORIGINAL SCALE using the MLE, QMVUE,
# and imputation with Q-Q regression (also called robust ROS).
# First look at the data:
#-----------------------
EPA.09.Ex.15.1.manganese.df
# Sample Well Manganese.Orig.ppb Manganese.ppb Censored
#1 1 Well.1 <5 5.0 TRUE
#2 2 Well.1 12.1 12.1 FALSE
#3 3 Well.1 16.9 16.9 FALSE
#...
#23 3 Well.5 3.3 3.3 FALSE
#24 4 Well.5 8.4 8.4 FALSE
#25 5 Well.5 <2 2.0 TRUE
longToWide(EPA.09.Ex.15.1.manganese.df,
"Manganese.Orig.ppb", "Sample", "Well",
paste.row.name = TRUE)
# Well.1 Well.2 Well.3 Well.4 Well.5
#Sample.1 <5 <5 <5 6.3 17.9
#Sample.2 12.1 7.7 5.3 11.9 22.7
#Sample.3 16.9 53.6 12.6 10 3.3
#Sample.4 21.6 9.5 106.3 <2 8.4
#Sample.5 <2 45.9 34.5 77.2 <2
# Now estimate the mean and coefficient of variation
# using the MLE:
#---------------------------------------------------
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored))
#Results of Distribution Parameter Estimation
#Based on Type I Censored Data
#--------------------------------------------
#
#Assumed Distribution: Lognormal
#
#Censoring Side: left
#
#Censoring Level(s): 2 5
#
#Estimated Parameter(s): mean = 23.003987
# cv = 2.300772
#
#Estimation Method: MLE
#
#Data: Manganese.ppb
#
#Censoring Variable: Censored
#
#Sample Size: 25
#
#Percent Censored: 24%
# Now compare the MLE with the QMVUE and the
# estimator based on imputation with Q-Q regression
#--------------------------------------------------
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored))$parameters
# mean cv
#23.003987 2.300772
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored,
method = "qmvue"))$parameters
# mean cv
#21.566945 1.841366
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored,
method = "impute.w.qq.reg"))$parameters
# mean cv
#19.886180 1.298868
#----------
# The method used to estimate quantiles for a Q-Q plot is
# determined by the argument prob.method. For the function
# elnormCensoredAlt, for any estimation method that involves
# Q-Q regression, the default value of prob.method is
# "hirsch-stedinger" and the default value for the
# plotting position constant is plot.pos.con=0.375.
# Both Helsel (2012) and USEPA (2009) also use the Hirsch-Stedinger
# probability method but set the plotting position constant to 0.
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored,
method = "impute.w.qq.reg", plot.pos.con = 0))$parameters
# mean cv
#19.827673 1.304725
#----------
# Using the same data as above, compute a confidence interval
# for the mean using the profile-likelihood method.
with(EPA.09.Ex.15.1.manganese.df,
elnormAltCensored(Manganese.ppb, Censored, ci = TRUE))
#Results of Distribution Parameter Estimation
#Based on Type I Censored Data
#--------------------------------------------
#
#Assumed Distribution: Lognormal
#
#Censoring Side: left
#
#Censoring Level(s): 2 5
#
#Estimated Parameter(s): mean = 23.003987
# cv = 2.300772
#
#Estimation Method: MLE
#
#Data: Manganese.ppb
#
#Censoring Variable: Censored
#
#Sample Size: 25
#
#Percent Censored: 24%
#
#Confidence Interval for: mean
#
#Confidence Interval Method: Profile Likelihood
#
#Confidence Interval Type: two-sided
#
#Confidence Level: 95%
#
#Confidence Interval: LCL = 12.37629
# UCL = 69.87694
Run the code above in your browser using DataLab