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
Returns
The function dk gives the density, pk gives the distribution function, qk gives the quantile function, and rk
generates random variates.
Details
The K-distribution with shape parameter ν and scale parameter b has amplitude density given by c("f(x) = [4 x^\\nu / \\Gamma(\\nu)]\n", "[(nu/b)(1+nu/2)]\n", "K(2xsqrt(nu/b),nu−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−2xν(ν/b)(ν/2)K(2x(ν/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 c("mum=(b/nu)(m/2)Gamma(0.5m+1)\n", "Gamma(0.5m+nu)/Gamma(nu)"), so that the root mean square value of x is the scale factor, <x2>=b.