Description Usage Arguments Details Value Author(s) Examples
Evaluation of the multivariate Student t distribution function (including non-integer degrees of freedom).
1 2 |
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
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.