Rayleigh Distribution
rayleighUC.RdDensity, distribution function, quantile function and random
generation for the Rayleigh distribution with parameter
a.
Usage
drayleigh(x, scale = 1, log = FALSE)
prayleigh(q, scale = 1, lower.tail = TRUE, log.p = FALSE)
qrayleigh(p, scale = 1, lower.tail = TRUE, log.p = FALSE)
rrayleigh(n, scale = 1)Value
drayleigh gives the density,
prayleigh gives the distribution function,
qrayleigh gives the quantile function, and
rrayleigh generates random deviates.
References
Forbes, C., Evans, M., Hastings, N. and Peacock, B. (2011). Statistical Distributions, Hoboken, NJ, USA: John Wiley and Sons, Fourth edition.
Details
See rayleigh, the VGAM family
function for estimating the scale parameter \(b\) by
maximum likelihood estimation, for the formula of the
probability density function and range restrictions on
the parameter \(b\).
Examples
if (FALSE) Scale <- 2; x <- seq(-1, 8, by = 0.1)
plot(x, drayleigh(x, scale = Scale), type = "l", ylim = c(0,1),
las = 1, ylab = "",
main = "Rayleigh density divided into 10 equal areas; red = CDF")
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'y' in selecting a method for function 'plot': object 'Scale' not found
abline(h = 0, col = "blue", lty = 2)
#> Error in int_abline(a = a, b = b, h = h, v = v, untf = untf, ...): plot.new has not been called yet
qq <- qrayleigh(seq(0.1, 0.9, by = 0.1), scale = Scale)
#> Error: object 'Scale' not found
lines(qq, drayleigh(qq, scale = Scale), col = 2, lty = 3, type = "h")
#> Error: object 'qq' not found
lines(x, prayleigh(x, scale = Scale), col = "red") # \dontrun{}
#> Error: object 'Scale' not found