Description Usage Arguments Details Value References See Also Examples
Density, distribution function, quantile function and random generation for
the K-distribution with parameters shape
and scale
.
1 2 3 4 5 6 7 8 |
x, q |
vector of quantiles |
shape, scale |
shape and scale parameters both defaulting to 1. |
intensity |
logical; if TRUE, quantiles are intensities not amplitudes. |
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]. |
p |
vector of probabilities |
n |
number of observations |
The K-distribution with shape
parameter ν and
scale
parameter b has amplitude density given by
f(x) = [4 x^ν / Γ(ν)]
[(ν / b)^(1+ν/2)]
K(2 x √(ν/b),ν-1).
Where K is a modified Bessel function of the second kind.
For ν -> Inf, the K-distrubution tends to a Rayleigh
distribution, and for ν = 1 it is the Exponential
distribution.
The function base::besselK
is used in the calculation, and
care should be taken with large input arguements to this function,
e.g. b very small or x, ν very large.
The cumulative distribution function for
the amplitude, x is given by
F(x) = 1 - 2 x^ν (ν/b)^(ν/2) K(2 x √(ν/b), ν).
The K-Distribution is a compound distribution, with Rayleigh
distributed amplitudes (exponential intensities) modulated by another
underlying process whose amplitude is chi-distributed and whose
intensity is Gamma distributed. An Exponential distributed number
multiplied by a Gamma distributed random number is used to
generate the random variates.
The mth moments are given by μ_m = (b/ν)^(m/2) Γ(0.5m + 1)
Γ(0.5m + ν) / Γ(ν), so that the root mean square
value of x is the scale
factor, <x^2> = b.
The function dk
gives the density, pk
gives the distribution
function, qk
gives the quantile function, and rk
generates random variates.
E Jakeman and R J A Tough, "Non-Gaussian models for the statistics of scattered waves", Adv. Phys., 1988, vol. 37, No. 5, pp471-529
Distributions
for other standard distributions, including dweibull
for the Weibull
distribution and dexp
for the exponential distribution.
1 2 3 4 5 6 7 8 9 10 11 12 | #=====
r <- rk(10000, shape = 3, scale = 5, intensity = FALSE)
fn <- stats::ecdf(r)
x <- seq(0, 10, length = 100)
plot(x, fn(x))
lines(x, pk(x, shape = 3, scale = 5, intensity = FALSE))
#======
r <- rk(10000, shape = 3, scale = 5, intensity = FALSE)
d <- density(r)
x <- seq(0, 10, length = 100)
plot(d, xlim=c(0,10))
lines(x, dk(x, shape = 3, scale = 5, intensity = FALSE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.