Last chance! 50% off unlimited learning
Sale ends in
epois(x, method = "mle/mme/mvue", ci = FALSE, ci.type = "two-sided",
ci.method = "exact", conf.level = 0.95)
"mle/mme/mvue"
(maximum likelihood/method of moments/minimum variance unbiased;
the default). See the DETAILS section for more information.FALSE
."two-sided"
(the default), "lower"
, and
"upper"
. This argument is ignored if ci=FALSE
."exact"
(the default), "pearson.hartley.approx"
(Pearson-Hartley approximation)conf.level=0.95
. This argument is ignored if
ci=FALSE
."estimate"
containing the estimated parameters and other information.
See estimate.object
for details.x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let $\underline{x} = (x_1, x_2, \ldots, x_n)$ be a vector of
$n$ observations from a Poisson distribution with
parameter lambda=
$\lambda$. It can be shown (e.g., Forbes et al., 2009)
that if $y$ is defined as:
lambda=
$n \lambda$.
Estimation
The maximum likelihood, method of moments, and minimum variance unbiased estimator
(mle/mme/mvue) of $\lambda$ is given by:
ci.type="exact"
), based on an approximation of
Pearson and Hartley (ci.type="pearson.hartley.approx"
), or based on the
normal approximation (ci.type="normal.approx"
).
Exact Confidence Interval (ci.method="exact"
)
If ci.type="two-sided"
, an exact $(1-\alpha)100%$ confidence interval
for $\lambda$ can be constructed as $[LCL, UCL]$, where the confidence
limits are computed such that:
lambda=
$n \lambda$.
If ci.type="lower"
, $\alpha/2$ is replaced with $\alpha$ in
equation (4) and $UCL$ is set to $\infty$.
If ci.type="upper"
, $\alpha/2$ is replaced with $\alpha$ in
equation (5) and $LCL$ is set to 0.
Note that an exact upper confidence bound can be computed even when all
observations are 0.
Pearson-Hartley Approximation (ci.method="pearson.hartley.approx"
)
For a two-sided $(1-\alpha)100%$ confidence interval for $\lambda$, the
Pearson and Hartley approximation (Zar, 2010, p.587; Pearson and Hartley, 1970, p.81)
is given by:
ci.method="normal.approx"
)
An approximate $(1-\alpha)100%$ confidence interval for $\lambda$ can be
constructed assuming the distribution of the estimator of $\lambda$ is
approximately normally distributed. A two-sided confidence interval is constructed
as:
# Generate 20 observations from a Poisson distribution with parameter
# lambda=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 <- rpois(20, lambda = 2)
epois(dat, ci = TRUE, conf.level = 0.9)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Poisson
#
#Estimated Parameter(s): lambda = 1.8
#
#Estimation Method: mle/mme/mvue
#
#Data: dat
#
#Sample Size: 20
#
#Confidence Interval for: lambda
#
#Confidence Interval Method: exact
#
#Confidence Interval Type: two-sided
#
#Confidence Level: 90%
#
#Confidence Interval: LCL = 1.336558
# UCL = 2.377037
#----------
# Compare the different ways of constructing confidence intervals for
# lambda using the same data as in the previous example:
epois(dat, ci = TRUE, ci.method = "pearson",
conf.level = 0.9)$interval$limits
# LCL UCL
#1.336558 2.377037
epois(dat, ci = TRUE, ci.method = "normal.approx",
conf.level = 0.9)$interval$limits
# LCL UCL
#1.306544 2.293456
#----------
# Clean up
#---------
rm(dat)
Run the code above in your browser using DataLab