
egeom(x, method = "mle/mme")
x+1
). Missing (NA
), undefined ("mle/mme"
(maximum likelihood and method of moments; the default) and
"mvue"
(minimum variance unbiased). You cannot use method="mvue"
"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$
independent observations from a geometric distribution
with parameter prob=
$p$.
It can be shown (e.g., Forbes et al., 2011) that if $X$ is defined as:
prob=
$p$ and size=
$n$.
Estimation
The maximum likelihood and method of moments estimator (mle/mme) of
$p$ is given by:
enbinom
, NegBinomial.# Generate an observation from a geometric distribution with parameter
# prob=0.2, then estimate the parameter prob.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rgeom(1, prob = 0.2)
dat
#[1] 4
egeom(dat)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Geometric
#
#Estimated Parameter(s): prob = 0.2
#
#Estimation Method: mle/mme
#
#Data: dat
#
#Sample Size: 1
#----------
# Generate 3 observations from a geometric distribution with parameter
# prob=0.2, then estimate the parameter prob with the mvue.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(200)
dat <- rgeom(3, prob = 0.2)
dat
#[1] 0 1 2
egeom(dat, method = "mvue")
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Geometric
#
#Estimated Parameter(s): prob = 0.4
#
#Estimation Method: mvue
#
#Data: dat
#
#Sample Size: 3
#----------
# Clean up
#---------
rm(dat)
Run the code above in your browser using DataLab