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

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.

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

`e` abb | Parameter Estimation |

`eq` abb | Quantile Estimation |

`predInt` Abb | Prediction Interval |

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

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

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

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

All lists of class `"intervalEstimate"`

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

include:

`print`

.

Since objects of class `"estimate"`

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

and `[[`

operators.

Steven P. Millard ([email protected])

Estimating Distribution Parameters, Estimating Distribution Quantiles,
`Distribution.df`

, Prediction Intervals,
Tolerance Intervals, `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 | ```
# 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"
class(estimate.obj)
#[1] "estimate"
names(estimate.obj)
#[1] "distribution" "sample.size" "parameters"
#[4] "n.param.est" "method" "data.name"
#[7] "bad.obs" "interval"
names(estimate.obj$interval)
#[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
#----------
# Extract the confidence limits for the mean
estimate.obj$interval$limits
# LCL UCL
#2.308798 3.413523
#----------
# Clean up
rm(dat, estimate.obj)
``` |

EnvStats documentation built on July 15, 2018, 9:03 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.