qgood {good} | R Documentation |
Quantile function for the Good distribution
Description
Quantile function for the Good distribution with parameters z and s.
Usage
qgood ( p , z , s , lower.tail = TRUE )
Arguments
p |
vector of non-negative integer quantiles. |
z |
vector of first parameter for the Good distribution. |
s |
vector of second parameter for the Good distribution. |
lower.tail |
logical; if TRUE (default), probabilities are
|
Value
The smallest integer x such that P(X \le x) \ge p
(or such that P(X \le x) \ge 1-p
if lower.tail is FALSE),
where X is a random variable following a Good distribution with parameters z
and s. Parameter z should be within the interval (0,1)
, and parameter s
in the reals. Vector p should have values between 0
and 1
. If vector p has
negative values and/or outside the interval (0,1)
, qgood
returns NaN
with a warning. If vector p contains 1, qgood
returns Inf. qgood
calls dgood
from package good.
Author(s)
Jordi Tur, David Moriña, Pere Puig, Alejandra Cabaña, Argimiro Arratia, Amanda Fernández-Fontelo
References
Good, J. (1953). The population frequencies of species and the estimation of population parameters. Biometrika, 40: 237–264.
Zörnig, P. and Altmann, G. (1995). Unified representation of zipf distributions. Computational Statistics & Data Analysis, 19: 461–473.
Kulasekera, K.B. and Tonkyn, D. (1992). A new distribution with applications to survival dispersal anddispersion. Communication in Statistics - Simulation and Computation, 21: 499–518.
Doray, L.G. and Luong, A. (1997). Efficient estimators for the good family. Communications in Statistics - Simulation and Computation, 26: 1075–1088.
Johnson, N.L., Kemp, A.W. and Kotz, S. Univariate Discrete Distributions. Wiley, Hoboken, 2005.
Kemp. A.W. (2010). Families of power series distributions, with particular reference to the lerch family. Journal of Statistical Planning and Inference, 140:2255–2259.
Wood, D.C. (1992). The Computation of Polylogarithms. Technical report. UKC, University of Kent, Canterbury, UK (KAR id:21052).
See Also
See also polylog
from copula, dgood
,
and pgood
and rgood
from good.
Examples
# if p is not within [0, 1], NaN is returned with a warning
qgood ( p = c ( -0.6 , 1.3 ) , z = 0.5 , s = -3 )
# if z is not within 0 and 1, NaN is returned with a warning
qgood ( p = 0.5 , z = c(-0.6, -9, 0.5) , s = -3 )
qgood ( p = 0.5 , z = 0.6 , s = -3 )
qgood ( p = c ( 0.025 , 0.5 , 0.975 ) , z = 0.6 , s = -3 )
qgood ( p = c ( 0.025 , 0.5 , 0.975 ) , z = c ( 0.6 , 0.3 , 0.1 ) , s = -5 )
qgood ( p = c ( 0.025 , 0.5 , 0.975 ) , z = c ( 0.6 , 0.3 , 0.5 ) , s = -3 , lower.tail = FALSE )
qgood ( p = c ( 0.025 , 0.5 , 0.975 ) , z = c ( 0.6 , 0.3 ) , s = -3 )