Description Usage Arguments Details Value Author(s) Examples
This function infers Poisson or zero-inflated Poisson (ZIP) parameters from grouped and right-censored count data, and conducts a chi-squared goodness-of-fit test. A grouped and right-censored scheme may look like
0, 1, 2--4, 5--8, 9+.
For grouped and right-censored count data collected in a survey, such as frequency of alcohol drinking, number of births or occurrence of crimes, the response category designed as the example above means never, once, 2 to 4 times, 5 to 8 times, 9 times and more. The frequency distribution from a sample corresponding to the example above may look like
3, 15, 168, 155, 15
.
1 2 3 4 |
counts |
specifies the frequency distribution of the grouped and right-censored count data. For the example above, one may input
|
scheme |
specifies the grouping scheme. It should be a vector of integers containing the starting point (or the lowest integer) of each group. For example, to input the scheme above
one may use
|
method |
a string parameter specifies which statistical model to use. Currently there are two options
|
do.plot |
a logical variable indicating whether or not to plot the log likelihood.
The default is |
init.guess |
the initial value used for the optimization procedure of the likelihood estimation. The default value
is |
optimizing.algorithm.index |
defines which optimization algorithm to use. Currently the possible values are
For details of these algorithms, please see the manual of the R package |
lambda.extend.ratio |
specifies the searching interval of possible λ as [0, nr], where n is the left end (i.e., the lowest integer)
of the last right-censored group, and r is
|
conf.level |
confidence level of the confidence interval(s) for the parameter(s) inferred |
Maximum likelihood estimation is used for the inference.
The returned value is a list containing
mle |
the parameter(s) inferred. For Poisson model, it is the estimate of λ. For ZIP model, it shows a vector of length 2: the first element is the estimate of p and the second element is the estimate of λ. |
p.value |
the p-value of the chi-squared test of goodness-of-fit. |
df |
the degree(s) of freedom of the chi-squared test of goodness-of-fit. |
CI.lambda |
the confidence interval of λ obtained by normal approximation |
CI.p |
the confidence interval of p obtained by normal approximation |
conf.level |
the confidence level |
std.err |
the standard error of λ or the standard errors of (p, λ), if a ZIP model is specified |
Authors: Xin Guo <x.guo@polyu.edu.hk>, Qiang Fu <qiang.fu@ubc.ca>
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.