Learn R Programming

NeuDist (version 1.0.1)

PoissonGenRayleigh: Poisson Generalized Rayleigh (PGR) Distribution

Description

Provides density, distribution, quantile, random generation, and hazard functions for the PGR distribution.

Usage

dpois.gen.rayleigh(x, alpha, beta, lambda, log = FALSE)
ppois.gen.rayleigh(q, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
qpois.gen.rayleigh(p, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE)
rpois.gen.rayleigh(n, alpha, beta, lambda)
hpois.gen.rayleigh(x, alpha, beta, lambda)

Value

  • dpois.gen.rayleigh: numeric vector of (log-)densities

  • ppois.gen.rayleigh: numeric vector of probabilities

  • qpois.gen.rayleigh: numeric vector of quantiles

  • rpois.gen.rayleigh: numeric vector of random variates

  • hpois.gen.rayleigh: numeric vector of hazard values

Arguments

x, q

numeric vector of quantiles (x, q)

alpha

positive numeric parameter

beta

positive numeric parameter

lambda

positive numeric parameter

log

logical; if TRUE, returns log-density

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\) otherwise, \(P[X > x]\).

log.p

logical; if TRUE, probabilities are given as log(p)

p

numeric vector of probabilities (0 < p < 1)

n

number of observations (integer > 0)

Details

The PGR distribution is parameterized by the parameters \(\alpha > 0\), \(\beta > 0\), and \(\lambda > 0\).

The PGR distribution has CDF:

$$ F(x; \alpha, \beta, \lambda) = \quad \frac{1}{\left(1-e^{-\lambda}\right)}\left[1-\exp \left\{-\lambda\left(1-e^{-\beta x^2}\right) ^\alpha\right\}\right] \quad ;\;x > 0. $$

where \(\alpha\), \(\beta\), and \(\lambda\) are the parameters.

The functions available are listed below:

  • dpois.gen.rayleigh() — Density function

  • ppois.gen.rayleigh() — Distribution function

  • qpois.gen.rayleigh() — Quantile function

  • rpois.gen.rayleigh() — Random generation

  • hpois.gen.rayleigh() — Hazard function

References

Joshi, R.K., & Kumar, V. (2021). Poisson Generalized Rayleigh Distribution with Properties and Application. International Journal of Statistics and Applied Mathematics, 6(1), 90--99. tools:::Rd_expr_doi("10.22271/maths.2021.v6.i1b.637")

Examples

Run this code
x <- seq(0.1, 2.0, 0.2)
dpois.gen.rayleigh(x, 2.0, 0.5, 0.2)
ppois.gen.rayleigh(x, 2.0, 0.5, 0.2)
qpois.gen.rayleigh(0.5, 2.0, 0.5, 0.2)
rpois.gen.rayleigh(10, 2.0, 0.5, 0.2)
hpois.gen.rayleigh(x, 2.0, 0.5, 0.2)

# Data
x <- stress
# ML estimates
params = list(alpha=1.5466, beta=0.0211, lambda=16.4523)
#P–P (probability–probability) plot
pp.plot(x, params = params, pfun = ppois.gen.rayleigh, fit.line=TRUE)

#Q-Q (quantile–quantile) plot 
qq.plot(x, params = params, qfun = qpois.gen.rayleigh, fit.line=TRUE)

# Goodness-of-Fit(GoF) and Model Diagnostics 
out <- gofic(x, params = params,
            dfun = dpois.gen.rayleigh, pfun=ppois.gen.rayleigh, plot=TRUE)
print.gofic(out)

Run the code above in your browser using DataLab