cdfMvte#
Purpose#
Computes multivariate Student’s t cumulative distribution function with error management.
Format#
- { y, err, retcode } = cdfMvte(ctl, x, corr, nonc, df)#
- Parameters:
ctl (struct) –
instance of a
cdfmControl
structure with membersctl.maxEvaluations
scalar, maximum number of evaluations.
ctl.absErrorTolerance
scalar, absolute error tolerance.
ctl.relErrorTolerance
scalar, tolerance.
x (NxK matrix) – Lower limits at which to evaluate the Student’s t cumulative distribution function. If x has more than one row, each row will be treated as a separate set of upper limits. K is the dimension of the multivariate Student’s t distribution. N is the number of MVT cdf integrals.
corr (KxK matrix) – correlation matrix.
nonc (Kx1 vector) – noncentralities.
df (scalar) – degrees of freedom.
- Returns:
p (N x 1 vector) – Each element in p is the cumulative distribution function of the multivariate Student’s t distribution for the corresponding elements in x.
err (Nx1 vector) – estimates of absolute error.
retcode (Nx1 vector) –
return codes.
0
normal completion with \(err < ctl.absErrorTolerance\).
1
\(err > ctl.absErrorTolerance\) and ctl.maxEvaluations exceeded; increase ctl.maxEvaluations to decrease error.
2
\(K > 100\) or \(K < 1\).
3
R not positive semi-definite.
missing
R not properly defined.
Examples#
Compute the multivariate student’s t cdf at 3 separate pairs of upper limits#
/*
** Upper limits of integration
** x1 ≤ -1 and x2 ≤ -1.1
** x1 ≤ 0 and x2 ≤ 0.1
** x1 ≤ 1 and x2 ≤ 1.1
*/
x = { -1 -1.1,
0 0.1,
1 1.1 };
// Correlation matrix
corr = { 1 0.31,
0.31 1 };
// Define non-centrality vector
nonc = {0, 0};
// Define degree of freedom
df = 3;
// Define control structure
struct cdfmControl ctl;
ctl = cdfmControlCreate();
/*
** Calculate cumulative probability of
** each pair of upper limits
*/
{p, err, retcode} = cdfMvte(ctl, x, corr, nonc, df);
After the above code, p should equal:
0.06752203
0.31824308
0.69617932
which means that:
Compute the non central multivariate student’s t cdf#
/*
** Upper limits of integration
** x1 ≤ -1 and x2 ≤ -1.1
** x1 ≤ 0 and x2 ≤ 0.1
** x1 ≤ 1 and x2 ≤ 1.1
*/
x = { -1 -1.1,
0 0.1,
1 1.1 };
// Correlation matrix
corr = { 1 0.31,
0.31 1 };
// Define non-centrality vector, Kx1
nonc = { 1, -2.5 };
// Define degree of freedom
df = 3;
// Define control structure
struct cdfmControl ctl;
ctl = cdfmControlCreate();
/*
** Calculate cumulative probability of
** each pair of upper limits
*/
{p, err, retcode} = cdfMvte(ctl, x, corr, nonc, df);
After the above code, p should equal:
0.03571301
0.15854358
0.46919524
which means with non-central vector, the multivariate student’s t cdf are:
References#
Genz, A. and F. Bretz,’’Numerical computation of multivariate t-probabilities with application to power calculation of multiple contrasts,’’ Journal of Statistical Computation and Simulation, 63:361-378, 1999.
Genz, A., ‘’Numerical computation of multivariate normal probabilities,’’ Journal of Computational and Graphical Statistics, 1:141-149, 1992.
See also
Functions cdfMvte()
, cdfMvt2e()
, cdfMvnce()