rtdf: Generate t distribution with vector degrees of freedom

Description Usage Arguments Details Value Examples

Description

Generate t distribution with vector degrees of freedom

Usage

1
2
rtdf(n = 1, M = matrix(0, nrow = length(a), ncol = ncol(B)), B = diag(1),
  a = rep(1, 2), A = diag(length(a)))

Arguments

n

number of draws from matrix t distribution with vector degrees of freedom

M

matrix of expected values (r x s)

B

among-column scale covariance matrix for underlying standard normal (s x s)

a

vector of degrees of freedom for underlying gamma Bellman distribution (r x 1)

A

scale matrix for underlying gamma Bellman distribution (r x r)

Details

Generate t distribution with vector degrees of freedom. The distribution is described in Shvedov generalisation of Algorithm by Alexey Balaev

Value

array of generated matrix t (n x r x s)

Examples

1
2
3
4
5
6
X <- rtdf(n = 5, a = c(1, 2, 3))
X
tt <- rtdf(n = 10^5, a=1.5)*sqrt(1.5) # one dimensional t with df=3
tt0 <- rt(n = 10^5, df=3)
quantile(tt0, probs=c(0.001,0.1,0.3,0.7,0.9,0.999))
quantile(tt, probs=c(0.001,0.1,0.3,0.7,0.9,0.999))

bdemeshev/vectordf documentation built on May 12, 2019, 9:40 a.m.