NAG CL Interface
g01hdc (prob_multi_students_t)
1
Purpose
g01hdc returns a probability associated with a multivariate Student's -distribution.
2
Specification
double |
g01hdc (Integer n,
const Nag_TailProbability tail[],
const double a[],
const double b[],
double nu,
const double delta[],
Nag_Boolean iscov,
double rc[],
Integer pdrc,
double epsabs,
double epsrel,
Integer numsub,
Integer nsampl,
Integer fmax,
double *errest,
NagError *fail) |
|
The function may be called by the names: g01hdc, nag_stat_prob_multi_students_t or nag_multi_students_t.
3
Description
A random vector
that follows a Student's
-distribution with
degrees of freedom and covariance matrix
has density:
and probability
given by:
The method of calculation depends on the dimension and degrees of freedom . The method of Dunnet and Sobel is used in the bivariate case if is a whole number. A Plackett transform followed by quadrature method is adopted in other bivariate cases and trivariate cases. In dimensions higher than three a number theoretic approach to evaluating multidimensional integrals is adopted.
Error estimates are supplied as the published accuracy in the Dunnet and Sobel case, a Monte Carlo standard error for multidimensional integrals, and otherwise the quadrature error estimate.
A parameter allows for non-central probabilities. The number theoretic method is used if any is nonzero.
In cases other than the central bivariate with whole , g01hdc attempts to evaluate probabilities within a requested accuracy , for an approximate integral value , absolute accuracy and relative accuracy .
4
References
Dunnet C W and Sobel M (1954) A bivariate generalization of Student's -distribution, with tables for certain special cases Biometrika 41 153–169
Genz A and Bretz F (2002) Methods for the computation of multivariate -probabilities Journal of Computational and Graphical Statistics (11) 950–971
5
Arguments
-
1:
– Integer
Input
-
On entry: , the number of dimensions.
Constraint:
.
-
2:
– const Nag_TailProbability
Input
-
On entry: defines the calculated probability, set
to:
- If the th lower limit is negative infinity.
- If the th upper limit is infinity.
- If both and are finite.
Constraint:
, or , for .
-
3:
– const double
Input
-
On entry:
, for
, the lower integral limits of the calculation.
If , is not referenced and the th lower limit of integration is .
-
4:
– const double
Input
-
On entry:
, for
, the upper integral limits of the calculation.
If , is not referenced and the th upper limit of integration is .
Constraint:
if , .
-
5:
– double
Input
-
On entry: , the degrees of freedom.
Constraint:
.
-
6:
– const double
Input
-
On entry: the noncentrality parameter for the th dimension, for ; set for the central probability.
-
7:
– Nag_Boolean
Input
-
On entry: set if the covariance matrix is supplied and if the correlation matrix is supplied.
-
8:
– double
Input/Output
-
Note: the th element of the matrix is stored in .
On entry: the lower triangle of either the covariance matrix (if ) or the correlation matrix (if ). In either case the array elements corresponding to the upper triangle of the matrix need not be set.
On exit: the strict upper triangle of
rc contains the correlation matrix used in the calculations.
-
9:
– Integer
Input
-
On entry: the stride separating matrix column elements in the array
rc.
Constraint:
.
-
10:
– double
Input
-
On entry:
, the absolute accuracy requested in the approximation. If
epsabs is negative, the absolute value is used.
Suggested value:
.
-
11:
– double
Input
-
On entry:
, the relative accuracy requested in the approximation. If
epsrel is negative, the absolute value is used.
Suggested value:
.
-
12:
– Integer
Input
-
On entry: if quadrature is used, the number of sub-intervals used by the quadrature algorithm; otherwise
numsub is not referenced.
Suggested value:
.
Constraint:
if referenced, .
-
13:
– Integer
Input
-
On entry: if quadrature is used,
nsampl is not referenced; otherwise
nsampl is the number of samples used to estimate the error in the approximation.
Suggested value:
.
Constraint:
if referenced,.
-
14:
– Integer
Input
-
On entry: if a number theoretic approach is used, the maximum number of evaluations for each integrand function.
Suggested value:
.
Constraint:
if referenced,.
-
15:
– double *
Output
-
On exit: an estimate of the error in the calculated probability.
-
16:
– NagError *
Input/Output
-
The NAG error argument (see
Section 7 in the Introduction to the NAG Library CL Interface).
6
Error Indicators and Warnings
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
- NE_ARRAY_SIZE
-
On entry, and .
Constraint: .
- NE_BAD_PARAM
-
On entry, argument had an illegal value.
- NE_INT
-
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
- NE_INTERNAL_ERROR
-
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
See
Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
- NE_INVALID_ARRAY
-
On entry, the information supplied in
rc is invalid.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library CL Interface for further information.
- NE_REAL
-
On entry, .
Constraint: degrees of freedom .
- NE_REAL_2
-
On entry, .
Constraint: for a central probability.
7
Accuracy
An estimate of the error in the calculation is given by the value of
errest on exit.
8
Parallelism and Performance
g01hdc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
g01hdc makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
10
Example
This example prints two probabilities from the Student's -distribution.
10.1
Program Text
10.2
Program Data
10.3
Program Results