npgeom | R Documentation |
npgeom
Class npgeom
is used to store data that will be
processed as those of a nonparametric geometric mixture.
Function npgeom
creates an object of class npgeom
,
given values and weights/frequencies.
Function rnpgeom
generates a random sample from a geometric
mixture and saves the data as an object of class npgeom
.
Function dnpgeom
is the density function of a Poisson
mixture.
Function pnpgeom
is the distribution function of a Poisson
mixture.
npgeom(v, w=1, grouping=FALSE)
rnpgeom(n, mix=disc(0.5))
dnpgeom(x, mix=disc(0.5), log=FALSE)
pnpgeom(x, mix=disc(0.5), lower.tail=TRUE, log.p=FALSE)
v |
a numeric vector that stores the values of a sample. |
w |
a numeric vector that stores the corresponding weights/frequencies of the observations. |
grouping |
logical, whether or not use frequencies (w) for identical values. |
n |
the sample size. |
x |
an object of class |
mix |
an object of class |
log |
=FALSE, if log-values are to be returned. |
lower.tail |
=FALSE, if lower.tail values are to be returned. |
log.p |
=FALSE, if log probability values are to be returned. |
Yong Wang <yongwang@auckland.ac.nz>
Wang, Y. (2007). On fast computation of the non-parametric maximum likelihood estimate of a mixing distribution. Journal of the Royal Statistical Society, Ser. B, 69, 185-198.
nnls
, cnm
,
cnmms
, plot.nspmix
.
mix = disc(pt=c(0.2,0.5), pr=c(0.3,0.7))
(x = rnpgeom(200, mix))
dnpgeom(x, mix)
pnpgeom(x, mix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.