
Estimate the rate parameter of an exponential distribution, and optionally construct a confidence interval for the rate parameter.
eexp(x, method = "mle/mme", ci = FALSE, ci.type = "two-sided",
ci.method = "exact", conf.level = 0.95)
numeric vector of observations.
character string specifying the method of estimation. Currently the only
possible value is "mle/mme"
(maximum likelihood/method of moments; the default). See the DETAILS section for
more information.
logical scalar indicating whether to compute a confidence interval for the
location or scale parameter. The default value is FALSE
.
character string indicating what kind of confidence interval to compute. The
possible values are "two-sided"
(the default), "lower"
, and
"upper"
. This argument is ignored if ci=FALSE
.
character string indicating what method to use to construct the confidence interval
for the location or scale parameter. Currently, the only possible value is
"exact"
(the default). See the DETAILS section for more information.
This argument is ignored if ci=FALSE
.
a scalar between 0 and 1 indicating the confidence level of the confidence interval.
The default value is conf.level=0.95
. This argument is ignored if
ci=FALSE
.
a list of class "estimate"
containing the estimated parameters and other information.
See
estimate.object
for details.
If x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let rate=
Estimation
The maximum likelihood estimator (mle) of
Sometimes the exponential distribution is parameterized with a scale parameter instead of a rate parameter. The scale parameter is the reciprocal of the rate parameter, and the sample mean is both the mle and the minimum variance unbiased estimator (mvue) of the scale parameter.
Confidence Interval
When ci=TRUE
, an exact rate=
shape=1
and scale=
shape=1
and
scale=
shape=
scale=
shape=
scale=
df=
df=
A two-sided
One-sided confidence intervals are computed in a similar fashion.
Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.
Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.
# NOT RUN {
# Generate 20 observations from an exponential distribution with parameter
# rate=2, then estimate the parameter and construct a 90% confidence interval.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rexp(20, rate = 2)
eexp(dat, ci=TRUE, conf = 0.9)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Exponential
#
#Estimated Parameter(s): rate = 2.260587
#
#Estimation Method: mle/mme
#
#Data: dat
#
#Sample Size: 20
#
#Confidence Interval for: rate
#
#Confidence Interval Method: Exact
#
#Confidence Interval Type: two-sided
#
#Confidence Level: 90%
#
#Confidence Interval: LCL = 1.498165
# UCL = 3.151173
#----------
# Clean up
#---------
rm(dat)
# }
Run the code above in your browser using DataLab