Objects of S3 class "estimate" 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 data assumed to come from that distribution.

Details

Objects of S3 class "estimate" are lists that contain information about the estimated distribution parameters, quantiles, and intervals. The names of the EnvStats functions that produce objects of class "estimate" have the following forms:

Form of Function NameResult
eabbParameter Estimation
eqabbQuantile Estimation
predIntAbbPrediction Interval
tolIntAbbTolerance 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 help files Estimating Distribution Parameters and Estimating Distribution Quantiles for lists of functions that estimate distribution parameters and quantiles. See the help files Prediction Intervals and Tolerance Intervals for lists of functions that create prediction and tolerance intervals.

For example:

  • The function enorm returns an object of class "estimate" (a list) with information about the estimated mean and standard deviation of the assumed normal (Gaussian) distribution, as well as an optional confidence interval for the mean.

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

  • The function predIntNorm returns a list of class "estimate" with information about the estimated mean and standard deviation of the assumed normal distribution, along with a prediction interval for a user-specified number of future observations (or means, medians, or sums).

  • The function tolIntNorm returns a list of class "estimate" with information about the estimated mean and standard deviation of the assumed normal distribution, along with a tolerance interval.

Methods

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

Value

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

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.

data.name

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

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 "estimate".

parameters

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

n.param.est

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

method

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

quantiles

a numeric vector of estimated 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 "intervalEstimate" 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 "estimate" are lists, you may extract their components with the $ and [[ operators.

Author

Steven P. Millard (EnvStats@ProbStatInfo.com)

Examples

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

  set.seed(250) 

  dat <- rnorm(20, mean = 3, sd = 2) 

  estimate.obj <- enorm(dat, ci = TRUE) 

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

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

  names(estimate.obj) 
#> [1] "distribution" "sample.size"  "parameters"   "n.param.est"  "method"      
#> [6] "data.name"    "bad.obs"      "interval"    
  #[1] "distribution" "sample.size"  "parameters" 
  #[4] "n.param.est"  "method"       "data.name" 
  #[7] "bad.obs"      "interval" 

  names(estimate.obj$interval) 
#> [1] "name"        "parameter"   "limits"      "type"        "method"     
#> [6] "conf.level"  "sample.size" "dof"        
  #[1] "name"        "parameter"   "limits" 
  #[4] "type"        "method"      "conf.level" 
  #[7] "sample.size" "dof" 

  estimate.obj 
#> 
#> Results of Distribution Parameter Estimation
#> --------------------------------------------
#> 
#> Assumed Distribution:            Normal
#> 
#> Estimated Parameter(s):          mean = 2.861160
#>                                  sd   = 1.180226
#> 
#> Estimation Method:               mvue
#> 
#> Data:                            dat
#> 
#> Sample Size:                     20
#> 
#> Confidence Interval for:         mean
#> 
#> Confidence Interval Method:      Exact
#> 
#> Confidence Interval Type:        two-sided
#> 
#> Confidence Level:                95%
#> 
#> Confidence Interval:             LCL = 2.308798
#>                                  UCL = 3.413523
#> 
  
  #Results of Distribution Parameter Estimation
  #--------------------------------------------
  #
  #Assumed Distribution:            Normal
  #
  #Estimated Parameter(s):          mean = 2.861160
  #                                 sd   = 1.180226
  #
  #Estimation Method:               mvue
  #
  #Data:                            dat
  #
  #Sample Size:                     20
  #
  #Confidence Interval for:         mean
  #
  #Confidence Interval Method:      Exact
  #
  #Confidence Interval Type:        two-sided
  #
  #Confidence Level:                95%
  #
  #Confidence Interval:             LCL = 2.308798
  #                                 UCL = 3.413523

  #----------

  # Extract the confidence limits for the mean

  estimate.obj$interval$limits
#>      LCL      UCL 
#> 2.308798 3.413523 
  #     LCL      UCL 
  #2.308798 3.413523 

  #----------

  # Clean up

  rm(dat, estimate.obj)