Description Details Value Methods Note Author(s) See Also Examples

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.

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 Name | Result |

`e` abb`Censored` | Parameter Estimation |

`eq` abb`Censored` | Quantile Estimation |

`predInt` Abb`Censored` | Prediction Interval |

`tolInt` Abb`Censored` | Tolerance 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.

**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 |

`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 ( |

**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 |

All lists of class `"intervalEstimateCensored"`

contain the following
component:

`name` |
a character string inidicating the kind of interval.
Possible values are: |

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

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

`type` |
the type of interval (i.e., |

`method` |
the method used to construct the interval
(e.g., |

`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 ( |

`k` |
(prediction intervals only) the minimum number of future
observations |

`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 |

Generic functions that have methods for objects of class
`"estimateCensored"`

include:

`print`

.

Since objects of class `"estimateCensored"`

are lists, you may extract
their components with the `$`

and `[[`

operators.

Steven P. Millard ([email protected])

EnvStats Functions for Censored Data,
`Distribution.df`

, `estimate.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 | ```
# 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"
class(estimateCensored.obj)
#[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"
names(estimateCensored.obj$interval)
#[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 = 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
#----------
# Clean up
rm(dat, censored, estimateCensored.obj)
``` |

EnvStats documentation built on Oct. 10, 2017, 1:05 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.