pStudent: Multivariate Student t Distribution Function

Description Usage Arguments Details Value Author(s) Examples

View source: R/student.R

Description

Evaluation of the multivariate Student t distribution function (including non-integer degrees of freedom).

Usage

1
2
pStudent(a, b, R, nu, gam = 3.3, eps = 0.001, Nmax = 1e8, N = 10,
         n_init = 2^5, precond = TRUE)

Arguments

a

vector of length d.

b

vector of length d.

R

positive definite (d,d)-covariance matrix.

nu

degress of freedom (any positive value).

eps

error tolerance.

gam

determines the stopping criterion of the algorithm; it will run until err < gam * eps.

Nmax

maximum number of function evaluations, can be used to control run time.

N

Number of repetitions to get an error estimate in the randomized quasi-Monte Carlo approach.

n_init

size of the first point set being used to estimate the probability.

precond

logical indicating if preconditioning is applied, that is, reordering the variables.

Details

Note that this procedure calls underlying C code. Currently, the dimension d cannot exceed 16510. If d = 1, the function calls the univarite pt().

Value

pStudent() returns a list of length four, containing the the estimated probabilities, the number of iterations, the total number of function evaluations and an error estimate.

Author(s)

Marius Hofert, Erik Hintz and Christiane Lemieux

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Generate a random correlation matrix in three dimensions
d <- 3
set.seed(271)
A <- matrix(runif(d * d), ncol = d)
P <- cov2cor(A %*% t(A))
## Evaluate t_{3.5} distribution function
a <- runif(d) * sqrt(d) * (-3) # random lower limit
b <- runif(d) * sqrt(d) * 3 # random upper limit
pt <- pStudent(a = a, b = b, R = P, nu = 3.5)
stopifnot(all.equal(pt$Prob, 0.8061, tol = 5e-4))

student documentation built on May 2, 2019, 6:48 p.m.