udt {Runuran}R Documentation

UNU.RAN object for Student t distribution

Description

Create UNU.RAN object for a Student t distribution with with df degrees of freedom.

[Distribution] – t (Student).

Usage

udt(df, lb=-Inf, ub=Inf)

Arguments

df

degrees of freedom (strictly positive). Non-integer values allowed.

lb

lower bound of (truncated) distribution.

ub

upper bound of (truncated) distribution.

Details

The t distribution with df = \nu degrees of freedom has density

f(x) = \frac{\Gamma ((\nu+1)/2)}{\sqrt{\pi \nu} \Gamma (\nu/2)} (1 + x^2/\nu)^{-(\nu+1)/2}

for all real x. It has mean 0 (for \nu > 1) and variance \frac{\nu}{\nu-2} (for \nu > 2).

The domain of the distribution can be truncated to the interval (lb,ub).

Value

An object of class "unuran.cont".

Author(s)

Josef Leydold and Wolfgang H\"ormann unuran@statmath.wu.ac.at.

References

N.L. Johnson, S. Kotz, and N. Balakrishnan (1995): Continuous Univariate Distributions, Volume 2. 2nd edition, John Wiley & Sons, Inc., New York. Chap. 28, p. 362.

See Also

unuran.cont.

Examples

## Create distribution object for t distribution
distr <- udt(df=4)
## Generate generator object; use method PINV (inversion)
gen <- pinvd.new(distr)
## Draw a sample of size 100
x <- ur(gen,100)


[Package Runuran version 0.38 Index]