elogis {EnvStats} | R Documentation |
Estimate Parameters of a Logistic Distribution
Description
Estimate the location and scale parameters of a logistic distribution, and optionally construct a confidence interval for the location parameter.
Usage
elogis(x, method = "mle", ci = FALSE, ci.type = "two-sided",
ci.method = "normal.approx", conf.level = 0.95)
Arguments
x |
numeric vector of observations. |
method |
character string specifying the method of estimation. Possible values are
|
ci |
logical scalar indicating whether to compute a confidence interval for the
location or scale parameter. The default value is |
ci.type |
character string indicating what kind of confidence interval to compute. The
possible values are |
ci.method |
character string indicating what method to use to construct the confidence interval
for the location or scale parameter. Currently, the only possible value is
|
conf.level |
a scalar between 0 and 1 indicating the confidence level of the confidence interval.
The default value is |
Details
If x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let be a vector of
observations from an logistic distribution with
parameters
location=
and
scale=
.
Estimation
Maximum Likelihood Estimation (method="mle"
)
The maximum likelihood estimators (mle's) of and
are
the solutions of the simultaneous equations (Forbes et al., 2011):
where
Method of Moments Estimation (method="mme"
)
The method of moments estimators (mme's) of and
are
given by:
where
that is, denotes the square root of the method of moments estimator
of variance.
Method of Moments Estimators Based on the Unbiased Estimator of Variance (method="mmue"
)
These estimators are exactly the same as the method of moments estimators given in
equations (4-7) above, except that the method of moments estimator of variance in
equation (7) is replaced with the unbiased estimator of variance:
Confidence Intervals
When ci=TRUE
, an approximate 100% confidence intervals
for
can be constructed assuming the distribution of the estimator of
is approximately normally distributed. A two-sided confidence
interval is constructed as:
where is the
'th quantile of
Student's t-distribution with
degrees of freedom, and the quantity
denotes the estimated asymptotic standard deviation of the estimator of .
One-sided confidence intervals for and
are computed in
a similar fashion.
Value
a list of class "estimate"
containing the estimated parameters and other information.
See estimate.object
for details.
Note
The logistic distribution is defined on the real line and is unimodal and symmetric about its location parameter (the mean). It has longer tails than a normal (Gaussian) distribution. It is used to model growth curves and bioassay data.
Author(s)
Steven P. Millard (EnvStats@ProbStatInfo.com)
References
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. (1995). Continuous Univariate Distributions, Volume 2. Second Edition. John Wiley and Sons, New York.
See Also
Examples
# Generate 20 observations from a logistic distribution with
# parameters location=0 and scale=1, then estimate the parameters
# and construct a 90% confidence interval for the location parameter.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rlogis(20)
elogis(dat, ci = TRUE, conf.level = 0.9)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Logistic
#
#Estimated Parameter(s): location = -0.2181845
# scale = 0.8152793
#
#Estimation Method: mle
#
#Data: dat
#
#Sample Size: 20
#
#Confidence Interval for: location
#
#Confidence Interval Method: Normal Approximation
# (t Distribution)
#
#Confidence Interval Type: two-sided
#
#Confidence Level: 90%
#
#Confidence Interval: LCL = -0.7899382
# UCL = 0.3535693
#----------
# Clean up
#---------
rm(dat)