dinvchisq: dinvchisq

Description Usage Arguments Author(s) See Also Examples

View source: R/invChiSquare.R

Description

density function and for the (scaled) inverse-chi-squared distribution.

Usage

1
dinvchisq(x, df, scale = 1/df, log = FALSE)

Arguments

x

vector of quantiles

df

degrees of freedom parameter, usually represented as nu

scale

scale parameter, usually represented as lambda.

log

Logical. If log=TRUE, then the logarithm of the density is returned.

Author(s)

Thomas Wutzler

See Also

dinvchisq

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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"))	

twDEMC documentation built on May 31, 2017, 3:44 a.m.