pStudent {student} | R Documentation |
Evaluation of the multivariate Student t distribution function (including non-integer degrees of freedom).
pStudent(a, b, R, nu, gam = 3.3, eps = 0.001, Nmax = 1e8, N = 10, n_init = 2^5, precond = TRUE)
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 |
|
Note that this procedure calls underlying C code. Currently, the
dimension d cannot exceed 16510. If d = 1, the function
calls the univarite pt()
.
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.
Marius Hofert, Erik Hintz and Christiane Lemieux
## 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))