Description Usage Arguments Details Value Author(s) References See Also Examples
The GPO()
function defines the generalised Poisson distribution, a two parameter discrete distribution, for a gamlss.family
object to be used in GAMLSS fitting using the function gamlss()
.
The functions dGPO
, pGPO
, qGPO
and rGPO
define the density, distribution function, quantile function and random
generation for the Delaporte GPO()
, distribution.
1 2 3 4 5 6 7 8 9 |
mu.link |
Defines the |
sigma.link |
Defines the |
x |
vector of (non-negative integer) quantiles |
mu |
vector of positive |
sigma |
vector of positive dispersion parameter |
p |
vector of probabilities |
q |
vector of quantiles |
n |
number of random values to return |
log, log.p |
logical; if TRUE, probabilities p are given as log(p) |
lower.tail |
logical; if TRUE (default), probabilities are P[X <= x], otherwise, P[X > x] |
max.value |
a constant, set to the default value of 10000 for how far the algorithm should look for q |
The probability function of the Generalised Poisson distribution is given by
f(y|mu,sigma)= (μ/ (1+σ+μ))^y (1+σ y)^(y-1)/y! exp(-μ (1+σ y)/(1+σ+μ))
for y=0,1,2,... where mu>0 and σ>0.
Returns a gamlss.family
object which can be used to fit a Generalised Poisson distribution in the gamlss()
function.
Rigby, R. A., Stasinopoulos D. M.
Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R. Journal of Statistical Software, Vol. 23, Issue 7, Dec 2007, http://www.jstatsoft.org/v23/i07.
Stasinopoulos D. M., Rigby R.A., Heller G., Voudouris V., and De Bastiani F., (2017) Flexible Regression and Smoothing: Using GAMLSS in R, Chapman and Hall/CRC.
(see also http://www.gamlss.org/).
gamlss.family
, PO
, DPO
1 2 3 4 5 6 7 8 | GPO()# gives information about the default links for the
#plot the pdf using plot
plot(function(y) dGPO(y, mu=10, sigma=1 ), from=0, to=100, n=100+1, type="h") # pdf
# plot the cdf
plot(seq(from=0,to=100),pGPO(seq(from=0,to=100), mu=10, sigma=1), type="h") # cdf
# generate random sample
tN <- table(Ni <- rGPO(100, mu=5, sigma=1))
r <- barplot(tN, col='lightblue')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.