plot.npnbinom | R Documentation |
Function plot.npnbinom
plots a negative
binomial mixture, along with data.
## S3 method for class 'npnbinom'
plot(
x,
mix,
beta,
col = "red",
add = FALSE,
components = TRUE,
main = "npnbinom",
lwd = 1,
lty = 1,
xlab = "Data",
ylab = "Density",
...
)
x |
an object of class |
mix |
an object of class |
beta |
the structural parameter (not used for a negative binomial mixture). |
col |
the color of the density curve to be plotted. |
add |
if |
components |
if |
main , lwd , lty , xlab , ylab |
arguments for graphical parameters
(see |
... |
arguments passed on to function |
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)) # a discrete distribution
x = rnpnbinom(200, 10, mix)
plot(x, mix)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.