plot.nppois {nspmix} | R Documentation |
Plotting a nonparametric Poisson mixture
Description
Function plot.nppois
plots a Poisson mixture,
along with data.
Usage
## S3 method for class 'nppois'
plot(
x,
mix,
beta,
col = 2,
add = FALSE,
components = c("proportions", "curves", "null"),
main = "nppois",
lwd = 1,
lty = 1,
xlab = "Data",
ylab = "Density",
xlim = NULL,
...
)
Arguments
x |
an object of class |
mix |
an object of class |
beta |
the structural parameter (not used for a Poisson mixture). |
col |
the color of the density curve to be plotted. |
add |
if |
components |
if |
main , lwd , lty , xlab , ylab , xlim |
arguments for graphical
parameters (see |
... |
arguments passed on to function |
Author(s)
Yong Wang <yongwang@auckland.ac.nz>
References
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.
See Also
nnls
, cnm
,
cnmms
, plot.nspmix
.
Examples
mix = disc(pt=c(0,4), pr=c(0.3,0.7)) # a discrete distribution
x = rnppois(200, mix)
plot(x, mix)