Description Usage Arguments Value See Also Examples
Estimate the one-inflated positive Poisson mixture model (OIPPMM)
1 2 3 |
y |
A vector of positive integers. |
l |
lambda, a vector of starting values for the positive Poisson
components. If |
p |
pi, a vector of starting values for the mixture weights.
|
K |
the number of components to be estimated in the OIPPMM. If |
tol |
Tolerance of the EM algorithm. The EM algorithm proceeds until the
proportional difference between all successive parameter estimates for
lambda and pi are less than |
maxLikmethod |
Maximization method passed to maxLik. Default is Newton-Raphson. |
maxiters |
Maximum number of EM iterations. |
minlam |
The minimum value that a mixture component can have before it
is considered to be a redundant one-inflating component. If any value in
lambda is less than |
reduntol |
After the EM algorithm converges, the estimation process will
begin again (including a grid search for new starting values), unless any
two components in lambda are within |
maxk |
The maximum number of positive Poisson components to be attempted in the search for the non-parametric MLE. |
If inflmix
is called with starting values for l
and
p
, returns a list containing:
termreas | the reason that the EM algorithm terminated (either convergence or iteration limit) |
iterations | the number of iterations until convergence |
lambda | the estimated values for the positive Poisson parameters |
pi | the estimated values for the component weights |
logl | the value of the log-likelihood function evaluated at the parameter estimates for lambda and pi |
n | the sample size, the length of the vector y |
predicted | the predicted counts obtained by evaluting the probability mass function of the OIPPMM model at the parameter estimates for lambda and pi, and for y = 1,…,max(y) |
chisq | the Pearson chi-square distance statistic obtained by comparing the actual and predicted counts |
HTn0 | the Horvitz-Thompson estimator for the number of missing zeros |
If inflmix
is called without starting values for l
and
p
(l=NULL
and p=NULL
), then inflmix
returns an
object of class 'inflmixNPMLE', a list containing each of the above objects,
for each estimated OIPPMM model with successively more mixture components,
in the search for the non-parametric MLE. An additional object is also provided:
termreasNPMLE
which documents the reason for the termination of the search
for the NPMLE (either NPMLE found, or maxk
reached).
rinflmix
and rinflmixN
for the generation of
random numbers from the OIPPMM.
1 2 3 4 5 6 7 8 9 | # Estimate several OIPPMMs with increasing number of components, until adding an
# additional component yields no improvement in the log-likelihood.
zz <- inflmix(1:20)
# The custom print method displays results in table
zz
# Provide starting values instead of searching for the NPMLE
inflmix(1:20, l=c(1, 4), p=c(.4, .4))
# Fix the number of components, without providing starting values
inflmix(1:20, K = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.