dist.Inverse.ChiSquare {LaplacesDemon}  R Documentation 
(Scaled) Inverse ChiSquared Distribution
Description
This is the density function and random generation for the (scaled) inverse chisquared distribution.
Usage
dinvchisq(x, df, scale, log=FALSE)
rinvchisq(n, df, scale=1/df)
Arguments
x 
This is a vector of quantiles. 
n 
This is the number of observations. If 
df 
This is the degrees of freedom parameter, usually
represented as 
scale 
This is the scale parameter, usually represented as

log 
Logical. If 
Details
Application: Continuous Univariate
Density:
p(\theta) = \frac{{\nu/2}^{\nu/2}}{\Gamma(\nu/2)} \lambda^\nu \frac{1}{\theta}^{\nu/2+1} \exp(\frac{\nu \lambda^2}{2\theta}), \theta \ge 0
Inventor: Derived from the chisquared distribution
Notation 1:
\theta \sim \chi^{2}(\nu, \lambda)
Notation 2:
p(\theta) = \chi^{2}(\theta  \nu, \lambda)
Parameter 1: degrees of freedom parameter
\nu > 0
Parameter 2: scale parameter
\lambda
Mean:
E(\theta)
= unknownVariance:
var(\theta)
= unknownMode:
mode(\theta) =
The inverse chisquared distribution, also called the
inverted chisquare distribution, is the multiplicate inverse of the
chisquared distribution. If x
has the chisquared distribution
with \nu
degrees of freedom, then 1 / x
has the
inverse chisquared distribution with \nu
degrees of freedom,
and \nu / x
has the inverse chisquared distribution with
\nu
degrees of freedom.
These functions are similar to those in the GeoR package.
Value
dinvchisq
gives the density and
rinvchisq
generates random deviates.
See Also
Examples
library(LaplacesDemon)
x < dinvchisq(1,1,1)
x < rinvchisq(10,1)
#Plot Probability Functions
x < seq(from=0.1, to=5, by=0.01)
plot(x, dinvchisq(x,0.5,1), ylim=c(0,1), type="l", main="Probability Function",
ylab="density", col="red")
lines(x, dinvchisq(x,1,1), type="l", col="green")
lines(x, dinvchisq(x,5,1), type="l", col="blue")
legend(3, 0.9, expression(paste(nu==0.5, ", ", lambda==1),
paste(nu==1, ", ", lambda==1), paste(nu==5, ", ", lambda==1)),
lty=c(1,1,1), col=c("red","green","blue"))