tau: positive valued scaling parameter; if provided it returns values for scaled chi-squared distributions.
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. If length(n) > 1, the length is taken to be the number required.
Details
If X follows χ2(ν) distribution, then 1/X follows inverse chi-squared distribution parametrized by ν. Inverse chi-squared distribution is a special case of inverse gamma distribution with parameters α=ν/2 and β=1/2; or α=ν/2 and β=(ντ2)/2 for scaled inverse chi-squared distribution.
Examples
x <- rinvchisq(1e5,20)hist(x,100, freq =FALSE)curve(dinvchisq(x,20),0,1, n =501, col ="red", add =TRUE)hist(pinvchisq(x,20))plot(ecdf(x))curve(pinvchisq(x,20),0,1, n =501, col ="red", lwd =2, add =TRUE)# scaledx <- rinvchisq(1e5,10,5)hist(x,100, freq =FALSE)curve(dinvchisq(x,10,5),0,150, n =501, col ="red", add =TRUE)hist(pinvchisq(x,10,5))plot(ecdf(x))curve(pinvchisq(x,10,5),0,150, n =501, col ="red", lwd =2, add =TRUE)