Objects of S3 class "estimateCensored" are returned by any of the EnvStats functions that estimate the parameters or quantiles of a probability distribution and optionally construct confidence, prediction, or tolerance intervals based on a sample of censored data assumed to come from that distribution.

Details

Objects of S3 class "estimateCensored" are lists that contain information about the estimated distribution parameters, quantiles, and (if present) intervals, as well as the censoring side, censoring levels and percentage of censored observations. The names of the EnvStats functions that produce objects of class "estimateCensored" have the following forms:

Form of Function NameResult
eabbCensoredParameter Estimation
eqabbCensoredQuantile Estimation
predIntAbbCensoredPrediction Interval
tolIntAbbCensoredTolerance Interval

where abb denotes the abbreviation of the name of a probability distribution (see the help file for Distribution.df for a list of available probability distributions and their abbreviations), and Abb denotes the same thing as abb except the first letter of the abbreviation for the probability distribution is capitalized.

See the sections Estimating Distribution Parameters, Estimating Distribution Quantiles, and Prediction and Tolerance Intervals in the help file EnvStats Functions for Censored Data for a list of functions that estimate distribution parameters, estimate distribution quantiles, create prediction intervals, or create tolerance intervals using censored data.

For example:

  • The function enormCensored returns an object of class "estimateCensored" (a list) with information about the estimated mean and standard deviation of the assumed normal (Gaussian) distribution, information about the amount and side of censoring, and also an optional confidence interval for the mean.

  • The function eqnormCensored returns a list of class "estimateCensored" with information about the estimated mean and standard deviation of the assumed normal distribution, information about the amount and side of censoring, the estimated user-specified quantile(s), and an optional confidence interval for a single quantile.

  • The function tolIntNormCensored returns a list of class "estimateCensored" with information about the estimated mean and standard deviation of the assumed normal distribution, information about the amount and side of censoring, and the computed tolerance interval.

Methods

Generic functions that have methods for objects of class "estimateCensored" include:
print.

Value

Required Components
The following components must be included in a legitimate list of class "estimateCensored".

distribution

character string indicating the name of the assumed distribution (this equals "Nonparametric") for nonparametric procedures).

sample.size

numeric scalar indicating the sample size used to estimate the parameters or quantiles.

censoring.side

character string indicating whether the data are left- or right-censored.

censoring.levels

numeric scalar or vector indicating the censoring level(s).

percent.censored

numeric scalar indicating the percent of non-missing observations that are censored.

data.name

character string indicating the name of the data object used to compute the estimateCensored parameters or quantiles.

censoring.name

character string indicating the name of the data object used to identify which values are censored.

bad.obs

numeric scalar indicating the number of missing (NA), undefined (NaN) and/or infinite (Inf, -Inf) values that were removed from the data object prior to performing the estimation.


Optional Components
The following components may optionally be included in a legitimate list of class "estimateCensored".

parameters

(parametric estimation only) a numeric vector with a names attribute containing the names and values of the estimateCensored distribution parameters.

n.param.est

(parametric estimation only) a scalar indicating the number of distribution parameters estimateCensored.

method

(parametric estimation only) a character string indicating the method used to compute the estimateCensored parameters.

quantiles

a numeric vector of estimateCensored quantiles.

quantile.method

a character string indicating the method of quantile estimation.

interval

a list of class "intervalEstimate" containing information on a confidence, tolerance, or prediction interval.


All lists of class "intervalEstimateCensored" contain the following component:

name

a character string inidicating the kind of interval. Possible values are:
"Confidence", "Tolerance", or "Prediction".


The number and names of the other components in a list of class "intervalEstimate" depends on the kind of interval it is. These components may include:

parameter

a character string indicating the parameter for which the interval is constructed (e.g., "mean", "95'th %ile", etc.).

limits

a numeric vector containing the lower and upper bounds of the interval.

type

the type of interval (i.e., "two-sided", "lower", or "upper").

method

the method used to construct the interval (e.g., "normal.approx").

conf.level

the confidence level associated with the interval.

sample.size

the sample size associated with the interval.

dof

(parametric intervals only) the degrees of freedom associated with the interval.

limit.ranks

(nonparametric intervals only) the rank(s) of the order statistic(s) used to construct the interval.

m

(prediction intervals only) the total number of future observations (n.mean=1, n.median=1, or n.sum=1) or averages (n.mean>1), medians
(n.median>1), or sums (n.sum>1).

k

(prediction intervals only) the minimum number of future observations
(n.mean=1, n.median=1, or n.sum=1), or averages (n.mean>1), medians
(n.median>1) or sums (n.sum>1) out of the total m that the interval should contain.

n.mean

(prediction intervals only) the sample size associated with the future averages that should be contained in the interval.

n.median

(prediction intervals only) the sample size associated with the future medians that should be contained in the interval.

n.sum

(Poisson prediction intervals only) the sample size associated with the future sums that should be contained in the interval.

rule

(simultaneous prediction intervals only) the rule used to construct the simultaneous prediction interval.

delta.over.sigma

(simultaneous prediction intervals only) numeric scalar indicating the ratio \(\Delta / \sigma\). The quantity \(\Delta\) (delta) denotes the difference between the mean of the population that was sampled to construct the prediction interval, and the mean of the population that will be sampled to produce the future observations. The quantity \(\sigma\) (sigma) denotes the population standard deviation for both populations.

Note

Since objects of class "estimateCensored" are lists, you may extract their components with the $ and [[ operators.

Author

Steven P. Millard (EnvStats@ProbStatInfo.com)

Examples

  # Create an object of class "estimateCensored", then print it out. 
  # (Note: the call to set.seed simply allows you to reproduce 
  # this example.)

  set.seed(250) 

  dat <- rnorm(20, mean = 100, sd = 20)
  censored <- dat < 90
  dat[censored] <- 90

  estimateCensored.obj <- enormCensored(dat, censored, ci = TRUE) 

  mode(estimateCensored.obj) 
#> [1] "list"
  #[1] "list" 

  class(estimateCensored.obj) 
#> [1] "estimateCensored"
  #[1] "estimateCensored" 

  names(estimateCensored.obj) 
#>  [1] "distribution"     "sample.size"      "censoring.side"   "censoring.levels"
#>  [5] "percent.censored" "parameters"       "n.param.est"      "method"          
#>  [9] "data.name"        "censoring.name"   "bad.obs"          "interval"        
#> [13] "var.cov.params"  
  # [1] "distribution"     "sample.size"      "censoring.side"   "censoring.levels"
  # [5] "percent.censored" "parameters"       "n.param.est"      "method"          
  # [9] "data.name"        "censoring.name"   "bad.obs"          "interval"        
  #[13] "var.cov.params" 

  names(estimateCensored.obj$interval) 
#> [1] "name"       "parameter"  "limits"     "type"       "method"    
#> [6] "conf.level"
  #[1] "name"       "parameter"  "limits"     "type"       "method"     "conf.level"
 

  estimateCensored.obj 
#> 
#> Results of Distribution Parameter Estimation
#> Based on Type I Censored Data
#> --------------------------------------------
#> 
#> Assumed Distribution:            Normal
#> 
#> Censoring Side:                  left
#> 
#> Censoring Level(s):              90 
#> 
#> Estimated Parameter(s):          mean = 98.18377
#>                                  sd   = 12.12899
#> 
#> Estimation Method:               MLE
#> 
#> Data:                            dat
#> 
#> Censoring Variable:              censored
#> 
#> Sample Size:                     20
#> 
#> Percent Censored:                25%
#> 
#> Confidence Interval for:         mean
#> 
#> Confidence Interval Method:      Profile Likelihood
#> 
#> Confidence Interval Type:        two-sided
#> 
#> Confidence Level:                95%
#> 
#> Confidence Interval:             LCL =  91.7801
#>                                  UCL = 103.7839
#> 
  
  #Results of Distribution Parameter Estimation
  #Based on Type I Censored Data
  #--------------------------------------------
  #
  #Assumed Distribution:            Normal
  #
  #Censoring Side:                  left
  #
  #Censoring Level(s):              90 
  #
  #Estimated Parameter(s):          mean = 96.52796
  #                                 sd   = 14.62275
  #
  #Estimation Method:               MLE
  #
  #Data:                            dat
  #
  #Censoring Variable:              censored
  #
  #Sample Size:                     20
  #
  #Percent Censored:                25%
  #
  #Confidence Interval for:         mean
  #
  #Confidence Interval Method:      Profile Likelihood
  #
  #Confidence Interval Type:        two-sided
  #
  #Confidence Level:                95%
  #
  #Confidence Interval:             LCL =  88.82415
  #                                 UCL = 103.27604


  #----------

  # Extract the confidence limits for the mean

  estimateCensored.obj$interval$limits
#>      LCL      UCL 
#>  91.7801 103.7839 
  #     LCL      UCL 
  # 91.7801 103.7839 

  #----------

  # Clean up

  rm(dat, censored, estimateCensored.obj)