Estimate the mean and standard deviation of a normal (Gaussian) distribution given a sample of data that has been subjected to Type I censoring, and optionally construct a confidence interval for the mean.
1 2 3 4  enormCensored(x, censored, method = "mle", censoring.side = "left",
ci = FALSE, ci.method = "profile.likelihood", ci.type = "twosided",
conf.level = 0.95, n.bootstraps = 1000, pivot.statistic = "z",
nmc = 1000, seed = NULL, ...)

x 
numeric vector of observations. Missing ( 
censored 
numeric or logical vector indicating which values of 
method 
character string specifying the method of estimation. For singly censored data, the possible values are: For multiply censored data, the possible values are: See the DETAILS section for more information. 
censoring.side 
character string indicating on which side the censoring occurs. The possible
values are 
ci 
logical scalar indicating whether to compute a confidence interval for the
mean or variance. The default value is 
ci.method 
character string indicating what method to use to construct the confidence interval
for the mean. The possible values are: See the DETAILS section for more information. This argument is ignored if 
ci.type 
character string indicating what kind of confidence interval to compute. The
possible values are 
conf.level 
a scalar between 0 and 1 indicating the confidence level of the confidence interval.
The default value is 
n.bootstraps 
numeric scalar indicating how many bootstraps to use to construct the
confidence interval for the mean when 
pivot.statistic 
character string indicating which pivot statistic to use in the construction
of the confidence interval for the mean when 
nmc 
numeric scalar indicating the number of Monte Carlo simulations to run when

seed 
integer supplied to the function 
... 
additional arguments to pass to other functions.

If 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} denote a vector of N observations from a normal distribution with mean μ and standard deviation σ. Assume n (0 < n < N) of these observations are known and c (c=Nn) of these observations are all censored below (leftcensored) or all censored above (rightcensored) at k fixed censoring levels
T_1, T_2, …, T_k; \; k ≥ 1 \;\;\;\;\;\; (1)
For the case when k ≥ 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 leftcensored and all n known observations are greater than or equal to T, or if the data are rightcensored 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, …, k, so that
∑_{i=1}^k c_j = c \;\;\;\;\;\; (2)
Let x_{(1)}, x_{(2)}, …, x_{(N)} denote the “ordered” observations, where now “observation” means either the actual observation (for uncensored observations) or the censoring level (for censored observations). For rightcensored data, if a censored observation has the same value as an uncensored one, the uncensored observation should be placed first. For leftcensored data, if a censored observation has the same value as an uncensored one, the censored observation should be placed first.
Note that in this case the quantity x_{(i)} does not necessarily represent the i'th “largest” observation from the (unknown) complete sample.
Finally, let Ω (omega) denote the set of n subscripts in the
“ordered” sample that correspond to uncensored observations.
ESTIMATION
Estimation Methods for Multiply and Singly Censored Data
The following methods are available for multiply and singly censored data.
Maximum Likelihood Estimation (method="mle"
)
For Type I left censored data, the likelihood function is given by:
L(μ, σ  \underline{x}) = {N \choose c_1 c_2 … c_k n} ∏_{j=1}^k [F(T_j)]^{c_j} ∏_{i \in Ω} f[x_{(i)}] \;\;\;\;\;\; (3)
where f and F denote the probability density function (pdf) and cumulative distribution function (cdf) of the population. That is,
f(t) = φ(\frac{tμ}{σ}) \;\;\;\;\;\; (4)
F(t) = Φ(\frac{tμ}{σ}) \;\;\;\;\;\; (5)
where φ and Φ 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(μ, σ  \underline{x}) = {N \choose c} [F(T)]^{c} ∏_{i = c+1}^n f[x_{(i)}] \;\;\;\;\;\; (6)
Similarly, for Type I right censored data, the likelihood function is given by:
L(μ, σ  \underline{x}) = {N \choose c_1 c_2 … c_k n} ∏_{j=1}^k [1  F(T_j)]^{c_j} ∏_{i \in Ω} f[x_{(i)}] \;\;\;\;\;\; (7)
and for right singly censored data this simplifies to:
L(μ, σ  \underline{x}) = {N \choose c} [1  F(T)]^{c} ∏_{i = 1}^n f[x_{(i)}] \;\;\;\;\;\; (8)
The maximum likelihood estimators are computed by maximizing the likelihood function. For rightcensored data, Cohen (1963; 1991, pp.5051) shows that taking partial derivatives of the loglikelihood function with respect to μ and σ and setting these to 0 produces the following two simultaneous equations:
\bar{x}  μ = σ ∑_{i=1}^k (\frac{c_j}{n}) Q_j \;\;\;\;\;\; (9)
s^2 + (\bar{x}  μ)^2 = σ^2[1  ∑_{j=1}^k ζ_j (\frac{c_j}{n}) Q_j] \;\;\;\;\;\; (10)
where
\bar{x} = \frac{1}{n} ∑_{i \in Ω} x_{(i)} \;\;\;\;\;\; (11)
s^2 = \frac{1}{n} ∑_{i \in Ω} (x_{(i)}  \bar{x})^2 \;\;\;\;\;\; (12)
Q_j = Q(ζ_j) \;\;\;\;\;\; (13)
ζ_j = \frac{T_j  μ}{σ} \;\;\;\;\;\; (14)
Q(t) = \frac{φ(t)}{1  Φ(t)} \;\;\;\;\;\; (15)
Note that the quantity defined in Equation (11) is simply the mean of the uncensored observations, the quantity defined in Equation (12) is simply the method of moments estimator of variance based on the uncensored observations, and the function Q() defined in Equation (15) is the hazard function for the standard normal distribution.
For leftcensored data, Equations (9) and (10) stay the same, except ζ is replaced with ζ.
The function enormCensored
computes the maximum likelihood estimators by
solving Equations (9) and (10) and uses the quantilequantile regression
estimators (see below) as initial values.
Regression on Order Statistics (method="ROS"
) or
QuantileQuantile Regression (method="qq.reg"
)
This method is sometimes called the probability plot method
(Nelson, 1982, Chapter 3; Gilbert, 1987, pp.134136;
Helsel and Hirsch, 1992, p. 361), and more recently also called
parametric regression on order statistics or ROS
(USEPA, 2009; Helsel, 2012). In the case of no censoring, it is well known
(e.g., Nelson, 1982, p.113; Cleveland, 1993, p.31) that for the standard
normal (Gaussian) quantilequantile plot (i.e., the plot of the sorted observations
(empirical quantiles) versus standard normal quantiles; see qqPlot
),
the intercept and slope of the fitted leastsquares line estimate the mean and
standard deviation, respectively. Specifically, the estimates of μ and
σ are found by computing the leastsquares estimates in the following
model:
x_{(i)} = μ + σ Φ^{1}(p_i) + ε_i, \; i = 1, 2, …, N \;\;\;\;\;\; (16)
where
p_i = \frac{ia}{N  2a + 1} \;\;\;\;\;\; (17)
denotes the plotting position associated with the i'th largest value, a is a constant such that 0 ≤ a ≤ 1 (the plotting position constant), and Φ denotes the cumulative distribution function (cdf) of the standard normal distribution. The default value of a is 0.375 (see below).
This method can be adapted to the case of left (right) singly censored data as follows. Plot the n uncensored observations against the n largest (smallest) normal quantiles, where the normal quantiles are computed based on a sample size of N, fit the leastsquares line to this plot, and estimate the mean and standard deviation from the intercept and slope, respectively. That is, use Equations (16) and (17), but for right singly censored data use i = 1, 2, …, n, and for left singly censored data use i = (c+1), (c+2), …, N.
The argument plot.pos.con
(see the entry for ... in the ARGUMENTS
section above) determines the value of the plotting positions computed in
Equation (18). The default value is plot.pos.con=0.375
.
See the help file for qqPlot
for more information.
This method is discussed by Haas and Scheff (1990). In the context of lognormal data, Travis and Land (1990) suggest exponentiating the predicted 50'th percentile from this fit to estimate the geometric mean (i.e., the median of the lognormal distribution).
This method is easily extended to multiply censored data. Equation (16) becomes
x_{(i)} = μ + σ Φ^{1}(p_i) + ε_i, \; i \in Ω \;\;\;\;\;\; (18)
where Ω denotes the set of n subscripts associated with the
uncensored observations in the ordered sample. The plotting positions are
computed by calling the EnvStats function ppointsCensored
.
The argument prob.method
determines the method of computing the plotting
positions (default is prob.method="hirschstedinger"
), and the argument
plot.pos.con
determines the plotting position constant (default is
plot.pos.con=0.375
). (See the entry for ... in the ARGUMENTS section above.)
Both Helsel (2012) and USEPA (2009) also use the HirschStedinger probability
method but set the plotting position constant to 0.
Robust Regression on Order Statistics (method="rROS"
) or
Imputation Using QuantileQuantile Regression (method="impute.w.qq.reg"
)
This is the robust Regression on Order Statistics (rROS) method discussed in
USEPA (2009) and Helsel (2012). It involves using the quantilequantile regression
method (method="qq.reg"
or method="ROS"
) to fit a regression line
(and thus initially estimate the mean and standard deviation), and then imputing the
values of the censored observations by predicting them from the regression equation.
The final estimates of the mean and standard deviation are then computed using
the usual formulas (see enorm
) based on the observed and imputed
values.
The imputed values are computed as:
\hat{x}_{(i)} = \hat{μ}_{qqreg} + \hat{σ}_{qqreg} Φ^{1}(p_i), \; i \not \in Ω \;\;\;\;\;\; (19)
See the help file for ppointsCensored
for information on how the
plotting positions for the censored observations are computed.
The argument prob.method
determines the method of computing the plotting
positions (default is prob.method="hirschstedinger"
), and the argument
plot.pos.con
determines the plotting position constant (default is
plot.pos.con=0.375
). (See the entry for ... in the ARGUMENTS section above.)
Both Helsel (2012) and USEPA (2009) also use the HirschStedinger probability
method but set the plotting position constant to 0.
The arguments lb.impute
and ub.impute
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=Inf
and ub.impute=Inf
.
See the entry for ... in the ARGUMENTS section above.
For singly censored data, this is the NR method of Gilliom and Helsel (1986, p. 137). In the context of lognormal data, this method is discussed by Hashimoto and Trussell (1983), Gilliom and Helsel (1986), and ElShaarawi (1989), and is referred to as the LR or LogProbability Method.
For multiply censored data, this method was developed in the context of
lognormal data by Helsel and Cohn (1988) using the formulas for plotting
positions given in Hirsch and Stedinger (1987) and Weibull plotting positions
(i.e., prob.method="hirschstedinger"
and plot.pos.con=0
).
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 mean and standard deviation with the usual
formulas (see enorm
).
This method is included only to allow comparison of this method to other methods. Setting leftcensored observations to half the censoring level is not recommended.
For singly censored data, this method is discussed by Gleit (1985), Haas and Scheff (1990), and ElShaarawi and Esterby (1992). ElShaarawi and Esterby (1992) show that these estimators are biased and inconsistent (i.e., the bias remains even as the sample size increases).
For multiply censored data, this method was studied by Helsel and Cohn
(1988).
Estimation Methods for Singly Censored Data
The following methods are available only for singly censored data.
BiasCorrected Maximum Likelihood Estimation (method="bcmle"
)
The maximum likelihood estimates of μ and σ are biased.
The bias tends to 0 as the sample size increases, but it can be considerable
for small sample sizes, especially in the case of a large percentage of
censored observations (Saw, 1961b). Schmee et al. (1985) note that bias and
variances of the mle's are of the order 1/N (see for example,
Bain and Engelhardt, 1991), and that for 90% censoring the bias is negligible
if N is at least 100. (For less intense censoring, even fewer
observations are needed.)
The exact bias of each estimator is extremely difficult to compute. Saw (1961b), however, derived the firstorder term (i.e., the term of order 1/N) in the bias of the mle's of μ and σ and proposed biascorrected mle's. His biascorrected estimators were derived for the case of Type II singly censored data. Schneider (1986, p.110) and Haas and Scheff (1990), however, state that this bias correction should reduce the bias of the estimators in the case of Type I censoring as well.
Based on the tables of biascorrection terms given in Saw (1961b), Schneider (1986, pp.107110) performed a leastsquares fit to produce the following computational formulas for rightcensored data:
B_{μ} = exp[2.692  5.493 \frac{n}{N+1}] \;\;\;\;\;\; (20)
B_{σ} = [0.312 + 0.859 \frac{n}{N+1}]^{2} \;\;\;\;\;\; (21)
\hat{μ}_{bcmle} = \hat{μ}_{mle}  \frac{\hat{σ}_{mle}}{N+1} B_{μ} \;\;\;\;\;\; (22)
\hat{σ}_{bcmle} = \hat{σ}_{mle}  \frac{\hat{σ}_{mle}}{N+1} B_{σ} \;\;\;\;\;\; (23)
For leftcensored data, Equation (22) becomes:
\hat{μ}_{bcmle} = \hat{μ}_{mle} + \frac{\hat{σ}_{mle}}{N+1} B_{μ} \;\;\;\;\;\; (22)
QuantileQuantile Regression Including the Censoring Level (method="qq.reg.w.cen.level"
)
This is a modification of the quantilequantile regression method and was proposed
by ElShaarawi (1989) in the context of lognormal data. ElShaarawi's idea is to
include the censoring level and an associated plotting position, along with the
uncensored observations and their associated plotting positions, in order to include
information about the value of the censoring level T.
For left singly censored data, the modification involves adding the point [Φ^{1}(p_c), T] to the plot before fitting the leastsquares line. For right singly censored data, the point [Φ^{1}(p_{n+1}), T] is added to the plot before fitting the leastsquares line.
ElShaarawi (1989) also proposed replacing the estimated normal quantiles with the
exact expected values of normal order statistics, and using the values in their
variancecovariance matrix to perform a weighted least leastsquared regression.
These last two modifications are not incorporated here.
Imputation Using QuantileQuantile Regression Including the Censoring Level
(method ="impute.w.qq.reg.w.cen.level"
)
This is exactly the same method as imputation using quantilequantile regression
(method="impute.w.qq.reg"
), except that the quantilequantile regression
including the censoring level method (method="qq.reg.w.cen.level"
) is used
to fit the regression line. In the context of lognormal data, this method is
discussed by ElShaarawi (1989), which he denotes as the Modified LR Method.
Imputation Using Maximum Likelihood (method ="impute.w.mle"
)
This is exactly the same method as imputation with quantilequantile 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 ElShaarawi (1989), which he denotes as the Modified Maximum Likelihood Method.
Iterative Imputation Using QuantileQuantile Regression (method="iterative.impute.w.qq.reg"
)
This method is similar to the imputation with quantilequantile regression method
(method="impute.w.qq.reg"
), but iterates until the estimates of the mean
and standard deviation converge. The algorithm is:
Compute the initial estimates of μ and σ using the
"impute.w.qq.reg"
method. (Actually, any suitable estimates will do.)
Using the current values of μ and σ and Equation (19), compute new imputed values of the censored observations.
Use the new imputed values along with the uncensored observations to
compute new estimates of μ and σ based on the usual
formulas (see enorm
).
Repeat Steps 2 and 3 until the estimates converge (the convergence
criterion is determined by the arguments tol
and convergence
;
see the entry for ... in the ARGUMENTS section above).
This method is discussed by Gleit (1985), which he denotes as
“FillIn with Expected Values”.
MEstimators (method="m.est"
)
This method was contributed by Leo R. Korn (Korn and Tyler, 2001).
This method finds location and scale estimates that are consistent at the
normal model and robust to deviations from the normal model, including both
outliers on the right and outliers on the left above and below the limit of
detection. The estimates are found by solving the simultaneous equations:
∑_{i=1}^c h_{ν} (\frac{Tμ}{σ}) + ∑_{i=c+1}^N ψ_{ν} (\frac{x_i  μ}{σ}) = 0 \;\;\;\;\;\; (23)
∑_{i=1}^c λ_{ν} (\frac{Tμ}{σ}) + ∑_{i=c+1}^N χ_{ν} (\frac{x_i  μ}{σ}) = 0 \;\;\;\;\;\; (24)
where
H_{ν}(r) = log[F_{ν}(r)] \;\;\;\;\;\; (25)
h_{ν}(r) = \frac{d}{dr} H_{ν}(r) = H'_{ν}(r) \;\;\;\;\;\; (26)
ρ_{ν}(r) = log[f_{ν}(r)] \;\;\;\;\;\; (27)
ψ_{ν}(r) = \frac{d}{dr} ρ_{ν}(r) = ρ'_{ν}(r) \;\;\;\;\;\; (28)
λ_{ν}(r) = r h_{ν}(r) \;\;\;\;\;\; (29)
χ_{ν}(r) = r ψ_{ν}(r)  1 \;\;\;\;\;\; (30)
and f_{ν} and F_{ν} denote the probability density function (pdf) and cumulative distribution function (cdf) of Student's tdistribution with ν degrees of freedom.
This results in an Mestimating equation based on the tdensity function (Korn and Tyler., 2001). Since the tdensity has heavier tails than the normal density, this Mestimator will tend to downweight values that are far away from the center of the data. When censoring is present, neither the location nor the scale estimates are consistent at the normal model. A computational correction is performed that converts the above Mestimator to another Mestimator that is consistent at the normal model, even under censoring.
The degrees of freedom parameter ν is set by the argument t.df
and
may be viewed as a tuning parameter that will determine the robustness and
efficiency properties. When t.df
is large, the estimator is similar to
the usual mle and the output will then be very close to that when method="mle"
.
As t.df
decreases, the efficiency will decline and the outlier rejection
property will increase in strength. Choosing t.df=3
(the default) provides
a good combination of efficiency and robustness. A reasonable strategy is to
transform the data so that they are approximately symmetric (often the log
transformation for environmental data is appropriate) and then apply the
Mestimator using t.df=3
.
CONFIDENCE INTERVALS
This section explains how confidence intervals for the mean μ 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 likelihoodratio test to obtain a
confidence interval for the mean μ while treating the standard deviation
σ as a nuisance parameter. Equation (3) above
shows the form of the likelihood function L(μ, σ  \underline{x}) for
multiply leftcensored data, and Equation (7) shows the function for
multiply rightcensored data.
Following Stryhn and Christensen (2003), denote the maximum likelihood estimates of the mean and standard deviation by (μ^*, σ^*). The likelihood ratio test statistic (G^2) of the hypothesis H_0: μ = μ_0 (where μ_0 is a fixed value) equals the drop in 2 log(L) between the “full” model and the reduced model with μ fixed at μ_0, i.e.,
G^2 = 2 \{log[L(μ^*, σ^*)]  log[L(μ_0, σ_0^*)]\} \;\;\;\;\;\; (30)
where σ_0^* is the maximum likelihood estimate of σ for the reduced model (i.e., when μ = μ_0). Under the null hypothesis, the test statistic G^2 follows a chisquared distribution with 1 degree of freedom.
Alternatively, we may express the test statistic in terms of the profile likelihood function L_1 for the mean μ, which is obtained from the usual likelihood function by maximizing over the parameter σ, i.e.,
L_1(μ) = max_{σ} L(μ, σ) \;\;\;\;\;\; (31)
Then we have
G^2 = 2 \{log[L_1(μ^*)]  log[L_1(μ_0)]\} \;\;\;\;\;\; (32)
A twosided (1α)100\% confidence interval for the mean μ consists of all values of μ_0 for which the test is not significant at level alpha:
μ_0: G^2 ≤ χ^2_{1, {1α}} \;\;\;\;\;\; (33)
where χ^2_{ν, p} denotes the p'th quantile of the
chisquared distribution with ν degrees of freedom.
Onesided lower and onesided upper confidence intervals are computed in a similar
fashion, except that the quantity 1α in Equation (33) is replaced with
12α.
Normal Approximation (ci.method="normal.approx"
)
This method constructs approximate (1α)100\% confidence intervals for
μ based on the assumption that the estimator of μ is
approximately normally distributed. That is, a twosided (1α)100\%
confidence interval for μ is constructed as:
[\hat{μ}  t_{1α/2, m1}\hat{σ}_{\hat{μ}}, \; \hat{μ} + t_{1α/2, m1}\hat{σ}_{\hat{μ}}] \;\;\;\; (34)
where \hat{μ} denotes the estimate of μ, \hat{σ}_{\hat{μ}} denotes the estimated asymptotic standard deviation of the estimator of μ, m denotes the assumed sample size for the confidence interval, and t_{p,ν} denotes the p'th quantile of Student's tdistribuiton with ν degrees of freedom. Onesided 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"
or "bcmle"
, the default value is the expected number of
uncensored observations, otherwise it is the observed number of
uncensored observations. This is simply an adhoc 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 tdistribution.
Approximate Confidence Interval Based on Maximum Likelihood Estimators
When method="mle"
, the standard deviation of the mle of μ is
estimated based on the inverse of the Fisher Information matrix. The estimated
variancecovariance matrix for the estimates of μ and σ
are based on the observed information matrix, formulas for which are given in
Cohen (1991).
Approximate Confidence Interval Based on BiasCorrected Maximum Likelihood Estimators
When method="bcmle"
(available only for singly censored data),
the same procedures are used to construct the
confidence interval as for method="mle"
. The true variance of the
biascorrected mle of μ is necessarily larger than the variance of the
mle of μ (although the differences in the variances goes to 0 as the
sample size gets large). Hence this method of constructing a confidence interval
leads to intervals that are too short for small sample sizes, but these intervals
should be better centered about the true value of μ.
Approximate Confidence Interval Based on Other Estimators
When method is some value other than "mle"
, the standard deviation of the
estimated mean is approximated by
\hat{σ}_{\hat{μ}} = \frac{\hat{σ}}{√{m}} \;\;\;\;\;\; (35)
where, as already noted, m denotes the assumed sample size. This is simply
an adhoc method of constructing confidence intervals and is not based on any
published theoretical results.
Normal Approximation Using Covariance (ci.method="normal.approx.w.cov"
)
This method is only available for singly censored data and only applicable when
method="mle"
or method="bcmle"
. It was proposed by Schneider
(1986, pp. 191193) for the case of Type II censoring, but is applicable to any
situation where the estimated mean and standard deviation are consistent estimators
and are correlated. In particular, the mle's of μ and σ are
correlated under Type I censoring as well.
Schneider's idea is to determine two positive quantities z_1, z_2 such that
Pr(\hat{μ} + z_1\hat{σ} < μ) = \frac{α}{2} \;\;\;\;\;\; (36)
Pr(\hat{μ}  z_2\hat{σ} > μ) = \frac{α}{2} \;\;\;\;\;\; (37)
so that
[\hat{μ}  z_2\hat{σ}, \; \hat{μ} + z_1\hat{σ}] \;\;\;\;\;\; (38)
is a (1α)100\% confidence interval for μ.
For cases where the estimators of μ and σ are independent (e.g., complete samples), it is well known that setting
z_1 = z_2 = \frac{t_{1α/2, N}}{√{N}} \;\;\;\;\;\; (39)
yields an exact confidence interval and setting
z_1 = z_2 = \frac{z_{1α/2}}{√{N}} \;\;\;\;\;\; (40)
where z_p denotes the p'th quantile of the standard normal distribution yields an approximate confidence interval that is asymptotically correct.
For the general case, Schneider (1986) considers the random variable
W(z) = \hat{μ} + z\hat{σ} \;\;\;\;\;\; (41)
and provides formulas for z_1 and z_2.
Note that the resulting confidence interval for the mean is not symmetric about
the estimated mean. Also note that the quantity m is a random variable for
Type I censoring, while Schneider (1986) assumed it to be fixed since he derived
the result for Type II censoring (in which case m=n).
Bootstrap and BiasCorrected 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α)100\% confidence interval for the population mean μ, the bootstrap can be broken down into the following steps:
Create a bootstrap sample by taking a random sample of size N from the observations in \underline{x}, where sampling is done with replacement. Note that because sampling is done with replacement, the same element of \underline{x} can appear more than once in the bootstrap sample. Thus, the bootstrap sample will usually not look exactly like the original sample (e.g., the number of censored observations in the bootstrap sample will often differ from the number of censored observations in the original sample).
Estimate μ based on the bootstrap sample created in Step 1, using the same method that was used to estimate μ using the original observations in \underline{x}. Because the bootstrap sample usually does not match the original sample, the estimate of μ based on the bootstrap sample will usually differ from the original estimate based on \underline{x}.
Repeat Steps 1 and 2 B times, where B is some large number.
For the function enormCensored
, the number of bootstraps B is
determined by the argument n.bootstraps
(see the section ARGUMENTS above).
The default value of n.bootstraps
is 1000
.
Use the B estimated values of μ to compute the empirical
cumulative distribution function of this estimator of μ (see
ecdfPlot
), and then create a confidence interval for μ
based on this estimated cdf.
The twosided percentile interval (Efron and Tibshirani, 1993, p.170) is computed as:
[\hat{G}^{1}(\frac{α}{2}), \; \hat{G}^{1}(1\frac{α}{2})] \;\;\;\;\;\; (42)
where \hat{G}(t) denotes the empirical cdf evaluated at t and thus \hat{G}^{1}(p) denotes the p'th empirical quantile, that is, the p'th quantile associated with the empirical cdf. Similarly, a onesided lower confidence interval is computed as:
[\hat{G}^{1}(α), \; ∞] \;\;\;\;\;\; (43)
and a onesided upper confidence interval is computed as:
[∞, \; \hat{G}^{1}(1α)] \;\;\;\;\;\; (44)
The function enormCensored
calls the R function quantile
to compute the empirical quantiles used in Equations (42)(44).
The percentile method bootstrap confidence interval is only firstorder accurate (Efron and Tibshirani, 1993, pp.187188), meaning that the probability that the confidence interval will contain the true value of μ can be off by k/√{N}, where k is some constant. Efron and Tibshirani (1993, pp.184188) proposed a biascorrected and accelerated interval that is secondorder accurate, meaning that the probability that the confidence interval will contain the true value of μ may be off by k/N instead of k/√{N}. The twosided biascorrected and accelerated confidence interval is computed as:
[\hat{G}^{1}(α_1), \; \hat{G}^{1}(α_2)] \;\;\;\;\;\; (45)
where
α_1 = Φ[\hat{z}_0 + \frac{\hat{z}_0 + z_{α/2}}{1  \hat{a}(z_0 + z_{α/2})}] \;\;\;\;\;\; (46)
α_2 = Φ[\hat{z}_0 + \frac{\hat{z}_0 + z_{1α/2}}{1  \hat{a}(z_0 + z_{1α/2})}] \;\;\;\;\;\; (47)
\hat{z}_0 = Φ^{1}[\hat{G}(\hat{μ})] \;\;\;\;\;\; (48)
\hat{a} = \frac{∑_{i=1}^N (\hat{μ}_{(\cdot)}  \hat{μ}_{(i)})^3}{6[∑_{i=1}^N (\hat{μ}_{(\cdot)}  \hat{μ}_{(i)})^2]^{3/2}} \;\;\;\;\;\; (49)
where the quantity \hat{μ}_{(i)} denotes the estimate of μ using all the values in \underline{x} except the i'th one, and
\hat{μ}{(\cdot)} = \frac{1}{N} ∑_{i=1}^N \hat{μ_{(i)}} \;\;\;\;\;\; (50)
A onesided lower confidence interval is given by:
[\hat{G}^{1}(α_1), \; ∞] \;\;\;\;\;\; (51)
and a onesided upper confidence interval is given by:
[∞, \; \hat{G}^{1}(α_2)] \;\;\;\;\;\; (52)
where α_1 and α_2 are computed as for a twosided confidence interval, except α/2 is replaced with α in Equations (46) and (47).
The constant \hat{z}_0 incorporates the bias correction, and the constant \hat{a} is the acceleration constant. The term “acceleration” refers to the rate of change of the standard error of the estimate of μ with respect to the true value of μ (Efron and Tibshirani, 1993, p.186). For a normal (Gaussian) distribution, the standard error of the estimate of μ does not depend on the value of μ, hence the acceleration constant is not really necessary.
When ci.method="bootstrap"
, the function enormCensored
computes both
the percentile method and biascorrected and accelerated method
bootstrap confidence intervals.
This method of constructing confidence intervals for censored data was studied by
Shumway et al. (1989).
Generalized Pivotal Quantity (ci.method="gpq"
)
This method was introduced by Schmee et al. (1985) and is discussed by
Krishnamoorthy and Mathew (2009). The idea is essentially to use a parametric
bootstrap to estimate the correct pivotal quantities z_1 and z_2 in
Equation (38) above. For singly censored data, these quantities are computed as
follows:
Generate a random sample of N observations from a standard normal (i.e., N(0,1)) distribution and let z_{(1)}, z_{(2)}, …, z_{(N)} denote the ordered (sorted) observations.
Set the smallest c
observations to be censored.
Compute the estimates of μ and σ using the method
specified by the method
argument, and denote these estimates as
\hat{μ}^*, \; \hat{σ}^*.
Compute the tlike pivotal quantity \hat{t} = \hat{μ}^*/\hat{σ}^*.
Repeat steps 14 nmc
times to produce an empirical distribution of
the tlike pivotal quantity.
The function enormCensored
calls the function
gpqCiNormSinglyCensored
to generate the distribution of
pivotal quantities in the case of singly censored data.
A twosided (1α)100\% confidence interval for μ is then
computed as:
[\hat{μ}  \hat{t}_{1(α/2)} \hat{σ}, \; \hat{μ}  \hat{t}_{α/2} \hat{σ}] \;\;\;\;\;\; (49)
where \hat{t}_p denotes the p'th empirical quantile of the
nmc
generated \hat{t} values.
Schmee at al. (1985) derived this method in the context of Type II singly censored data (for which these limits are exact within Monte Carlo error), but state that according to Regal (1982) this method produces confidence intervals that are close apporximations to the correct limits for Type I censored data.
For multiply censored data, this method has been extended as follows. The
algorithm stays the same, except that Step 2 becomes:
2. Set the i'th ordered generated observation to be censored or not censored according to whether the i'th observed observation in the original data is censored or not censored.
The function enormCensored
calls the function
gpqCiNormMultiplyCensored
to generate the distribution of
pivotal quantities in the case of multiply censored data.
a list of class "estimateCensored"
containing the estimated parameters
and other information. See estimateCensored.object
for details.
A sample of data contains censored observations if some of the observations are reported only as being below or above some censoring level. In environmental data analysis, Type I leftcensored data sets are common, with values being reported as “less than the detection limit” (e.g., Helsel, 2012). Data sets with only one censoring level are called singly censored; data sets with multiple censoring levels are called multiply or progressively censored.
Statistical methods for dealing with censored data sets have a long history in the field of survival analysis and life testing. More recently, researchers in the environmental field have proposed alternative methods of computing estimates and confidence intervals in addition to the classical ones such as maximum likelihood estimation.
Helsel (2012, Chapter 6) gives an excellent review of past studies of the properties of various estimators based on censored environmental data.
In practice, it is better to use a confidence interval for the mean or a joint confidence region for the mean and standard deviation, rather than rely on a single pointestimate of the mean. Since confidence intervals and regions depend on the properties of the estimators for both the mean and standard deviation, the results of studies that simply evaluated the performance of the mean and standard deviation separately cannot be readily extrapolated to predict the performance of various methods of constructing confidence intervals and regions. Furthermore, for several of the methods that have been proposed to estimate the mean based on type I leftcensored data, standard errors of the estimates are not available, hence it is not possible to construct confidence intervals (ElShaarawi and Dolan, 1989).
Few studies have been done to evaluate the performance of methods for constructing confidence intervals for the mean or joint confidence regions for the mean and standard deviation when data are subjected to single or multiple censoring. See, for example, Singh et al. (2006).
Schmee et al. (1985) studied Type II censoring for a normal distribution and
noted that the bias and variances of the maximum likelihood estimators are of the
order 1/N, and that the bias is negligible for N=100 and as much as
90% censoring. (If the proportion of censored observations is less than 90%,
the bias becomes negligible for smaller sample sizes.) For small samples with
moderate to high censoring, however, the bias of the mle's causes confidence
intervals based on them using a normal approximation (e.g., method="mle"
and ci.method="normal.approx"
) to be too short. Schmee et al. (1985)
provide tables for exact confidence intervals for sample sizes up to N=100
that were created based on Monte Carlo simulation. Schmee et al. (1985) state
that these tables should work well for Type I censored data as well.
Shumway et al. (1989) evaluated the coverage of 90% confidence intervals for the mean based on using a BoxCox transformation to induce normality, computing the mle's based on the normal distribution, then computing the mean in the original scale. They considered three methods of constructing confidence intervals: the delta method, the bootstrap, and the biascorrected bootstrap. Shumway et al. (1989) used three parent distributions in their study: Normal(3,1), the square of this distribuiton, and the exponentiation of this distribution (i.e., a lognormal distribution). Based on sample sizes of 10 and 50 with a censoring level at the 10'th or 20'th percentile, Shumway et al. (1989) found that the delta method performed quite well and was superior to the bootstrap method.
Millard et al. (2015; in preparation) show that the coverage of the profile likelihood method is excellent.
Steven P. Millard (EnvStats@ProbStatInfo.com)
Bain, L.J., and M. Engelhardt. (1991). Statistical Analysis of Reliability and LifeTesting Models. Marcel Dekker, New York, 496pp.
Cohen, A.C. (1959). Simplified Estimators for the Normal Distribution When Samples are Singly Censored or Truncated. Technometrics 1(3), 217–237.
Cohen, A.C. (1963). Progressively Censored Samples in Life Testing. Technometrics 5, 327–339
Cohen, A.C. (1991). Truncated and Censored Samples. Marcel Dekker, New York, New York, 312pp.
Cox, D.R. (1970). Analysis of Binary Data. Chapman & Hall, London. 142pp.
Efron, B. (1979). Bootstrap Methods: Another Look at the Jackknife. The Annals of Statistics 7, 1–26.
Efron, B., and R.J. Tibshirani. (1993). An Introduction to the Bootstrap. Chapman and Hall, New York, 436pp.
ElShaarawi, A.H. (1989). Inferences About the Mean from Censored Water Quality Data. Water Resources Research 25(4) 685–690.
ElShaarawi, A.H., and D.M. Dolan. (1989). Maximum Likelihood Estimation of Water Quality Concentrations from Censored Data. Canadian Journal of Fisheries and Aquatic Sciences 46, 1033–1039.
ElShaarawi, A.H., and S.R. Esterby. (1992). Replacement of Censored Observations by a Constant: An Evaluation. Water Research 26(6), 835–844.
ElShaarawi, A.H., and A. Naderi. (1991). Statistical Inference from Multiply Censored Environmental Data. Environmental Monitoring and Assessment 17, 339–347.
Gibbons, R.D., D.K. Bhaumik, and S. Aryal. (2009). Statistical Methods for Groundwater Monitoring, Second Edition. John Wiley & Sons, Hoboken.
Gilliom, R.J., and D.R. Helsel. (1986). Estimation of Distributional Parameters for Censored Trace Level Water Quality Data: 1. Estimation Techniques. Water Resources Research 22, 135–146.
Gleit, A. (1985). Estimation for Small Normal Data Sets with Detection Limits. Environmental Science and Technology 19, 1201–1206.
Haas, C.N., and P.A. Scheff. (1990). Estimation of Averages in Truncated Samples. Environmental Science and Technology 24(6), 912–919.
Hashimoto, L.K., and R.R. Trussell. (1983). Evaluating Water Quality Data Near the Detection Limit. Paper presented at the Advanced Technology Conference, American Water Works Association, Las Vegas, Nevada, June 59, 1983.
Helsel, D.R. (1990). Less than Obvious: Statistical Treatment of Data Below the Detection Limit. Environmental Science and Technology 24(12), 1766–1774.
Helsel, D.R. (2012). Statistics for Censored Environmental Data Using Minitab and R, Second Edition. John Wiley \& Sons, Hoboken, New Jersey.
Helsel, D.R., and T.A. Cohn. (1988). Estimation of Descriptive Statistics for Multiply Censored Water Quality Data. Water Resources Research 24(12), 1997–2004.
Hirsch, R.M., and J.R. Stedinger. (1987). Plotting Positions for Historical Floods and Their Precision. Water Resources Research 23(4), 715–727.
Korn, L.R., and D.E. Tyler. (2001). Robust Estimation for Chemical Concentration Data Subject to Detection Limits. In Fernholz, L., S. Morgenthaler, and W. Stahel, eds. Statistics in Genetics and in the Environmental Sciences. Birkhauser Verlag, Basel, pp.41–63.
Krishnamoorthy K., and T. Mathew. (2009). Statistical Tolerance Regions: Theory, Applications, and Computation. John Wiley and Sons, Hoboken.
Michael, J.R., and W.R. Schucany. (1986). Analysis of Data from Censored Samples. In D'Agostino, R.B., and M.A. Stephens, eds. Goodnessof Fit Techniques. Marcel Dekker, New York, 560pp, Chapter 11, 461–496.
Millard, S.P., P. Dixon, and N.K. Neerchal. (2014; in preparation). Environmental Statistics with R. CRC Press, Boca Raton, Florida.
Nelson, W. (1982). Applied Life Data Analysis. John Wiley and Sons, New York, 634pp.
Newman, M.C., P.M. Dixon, B.B. Looney, and J.E. Pinder. (1989). Estimating Mean and Variance for Environmental Samples with Below Detection Limit Observations. Water Resources Bulletin 25(4), 905–916.
Pettitt, A. N. (1983). ReWeighted Least Squares Estimation with Censored and Grouped Data: An Application of the EM Algorithm. Journal of the Royal Statistical Society, Series B 47, 253–260.
Regal, R. (1982). Applying Order Statistic Censored Normal Confidence Intervals to Time Censored Data. Unpublished manuscript, University of Minnesota, Duluth, Department of Mathematical Sciences.
Royston, P. (2007). Profile Likelihood for Estimation and Confdence Intervals. The Stata Journal 7(3), pp. 376–387.
Saw, J.G. (1961b). The Bias of the Maximum Likelihood Estimators of Location and Scale Parameters Given a Type II Censored Normal Sample. Biometrika 48, 448–451.
Schmee, J., D.Gladstein, and W. Nelson. (1985). Confidence Limits for Parameters of a Normal Distribution from Singly Censored Samples, Using Maximum Likelihood. Technometrics 27(2) 119–128.
Schneider, H. (1986). Truncated and Censored Samples from Normal Populations. Marcel Dekker, New York, New York, 273pp.
Shumway, R.H., A.S. Azari, and P. Johnson. (1989). Estimating Mean Concentrations Under Transformations for Environmental Data With Detection Limits. Technometrics 31(3), 347–356.
Singh, A., R. Maichle, and S. Lee. (2006). On the Computation of a 95% Upper Confidence Limit of the Unknown Population Mean Based Upon Data Sets with Below Detection Limit Observations. EPA/600/R06/022, March 2006. Office of Research and Development, U.S. Environmental Protection Agency, Washington, D.C.
Stryhn, H., and J. Christensen. (2003). Confidence Intervals by the Profile Likelihood Method, with Applications in Veterinary Epidemiology. Contributed paper at ISVEE X (November 2003, Chile). http://people.upei.ca/hstryhn/stryhn208.pdf.
Travis, C.C., and M.L. Land. (1990). Estimating the Mean of Data Sets with Nondetectable Values. Environmental Science and Technology 24, 961–962.
USEPA. (2009). Statistical Analysis of Groundwater Monitoring Data at RCRA Facilities, Unified Guidance. EPA 530/R09007, March 2009. Office of Resource Conservation and Recovery Program Implementation and Information Division. U.S. Environmental Protection Agency, Washington, D.C. Chapter 15.
USEPA. (2010). Errata Sheet  March 2009 Unified Guidance. EPA 530/R09007a, August 9, 2010. Office of Resource Conservation and Recovery, Program Information and Implementation Division. U.S. Environmental Protection Agency, Washington, D.C.
Venzon, D.J., and S.H. Moolgavkar. (1988). A Method for Computing ProfileLikelihoodBased Confidence Intervals. Journal of the Royal Statistical Society, Series C (Applied Statistics) 37(1), pp. 87–94.
Normal, enorm
, estimateCensored.object
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152  # Chapter 15 of USEPA (2009) gives several examples of estimating the mean
# and standard deviation of a lognormal distribution on the logscale 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 standard deviation using the MLE,
# QQ regression (also called parametric regression on order statistics
# or ROS; e.g., USEPA, 2009 and Helsel, 2012), and imputation with QQ
# regression (also called robust regression on order statistics or rROS).
# We will logtransform the original observations and then call
# enormCensored. Alternatively, we could have more simply called
# elnormCensored.
# 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 standard deviation on the logscale
# using the MLE:
#
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored))
#Results of Distribution Parameter Estimation
#Based on Type I Censored Data
#
#
#Assumed Distribution: Normal
#
#Censoring Side: left
#
#Censoring Level(s): 0.6931472 1.6094379
#
#Estimated Parameter(s): mean = 2.215905
# sd = 1.356291
#
#Estimation Method: MLE
#
#Data: log(Manganese.ppb)
#
#Censoring Variable: Censored
#
#Sample Size: 25
#
#Percent Censored: 24%
# Now compare the MLE with the estimators based on
# QQ regression and imputation with QQ regression
#
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored))$parameters
# mean sd
#2.215905 1.356291
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored,
method = "ROS"))$parameters
# mean sd
#2.293742 1.283635
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored,
method = "rROS"))$parameters
# mean sd
#2.298656 1.238104
#
# The method used to estimate quantiles for a QQ plot is
# determined by the argument prob.method. For the functions
# enormCensored and elnormCensored, for any estimation
# method that involves QQ regression, the default value of
# prob.method is "hirschstedinger" and the default value for the
# plotting position constant is plot.pos.con=0.375.
# Both Helsel (2012) and USEPA (2009) also use the HirschStedinger
# probability method but set the plotting position constant to 0.
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored,
method = "rROS", plot.pos.con = 0))$parameters
# mean sd
#2.277175 1.261431
#
# Using the same data as above, compute a confidence interval
# for the mean on the logscale using the profilelikelihood
# method.
with(EPA.09.Ex.15.1.manganese.df,
enormCensored(log(Manganese.ppb), Censored, ci = TRUE))
#Results of Distribution Parameter Estimation
#Based on Type I Censored Data
#
#
#Assumed Distribution: Normal
#
#Censoring Side: left
#
#Censoring Level(s): 0.6931472 1.6094379
#
#Estimated Parameter(s): mean = 2.215905
# sd = 1.356291
#
#Estimation Method: MLE
#
#Data: log(Manganese.ppb)
#
#Censoring Variable: Censored
#
#Sample Size: 25
#
#Percent Censored: 24%
#
#Confidence Interval for: mean
#
#Confidence Interval Method: Profile Likelihood
#
#Confidence Interval Type: twosided
#
#Confidence Level: 95%
#
#Confidence Interval: LCL = 1.595062
# UCL = 2.771197

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.