mvstud {mvtnormpcs}R Documentation

Multivariate Student Distribution with Product Correlation Structure

Description

Computes the multivariate student integral using mvnprd, subject to the constraint of a product correlation structure, s.t. RHO(I,J) = BPD(I)*BPD(J)

Usage

    result <- mvstud(NDF, A, B, BPD, INF, D, EPS = 1e-04, IERC = 1, HINC = 0)

Arguments

NDF Degrees of Freedom. Use 0 for infinite D.F.
A Upper limits of integration. Array of N dimensions
B Lower limits of integration. Array of N dimensions
BPD Values defining correlation structure. Array of N dimensions
INF Determines where integration is done to infinity. Array of N dimensions. Valid values for INF(I): 0=(B(I), inf), 1=(-inf, A(I)), 2=(B(I),A(I))
D Non-Centrality Vector
EPS desired accuracy. Defaults to 1e-04
IERC error control. If set to 1, strict error control based on fourth derivative is used. If set to zero, error control based on halving intervals is used
HINC Interval width for Simpson's rule. Value of zero caused a default .24 to be used

Value

Returns a list of values

PROB approximation to the N-variate probability
BOUND bound on error of the approximation
IFAULT a fault indicator. If 1, error in dimensions (N<1 or N>50). If 2, BPD<-1 or BPD>1. If 3, INF not 0, 1, or 2. If 4, INF(I)=2 and A(I)<= B(I). If 5, the number of terms computed exceeds the limit. If 6, a fault occurred in normal subroutines. If 7, subintervals are too narrow, or too many. If 8, BOUND exceeds EPS. If 0, no errors.

Note

Much of this help text was paraphrased and/or copied from Dunnett's code, as presented with the paper listed in the references.

Author(s)

Fortran code by Charles W. Dunnett.

Ported to R by Duane Currie <duane.currie@acadiau.ca>, Acadia Centre for Mathematical Modeling and Computation, Acadia University

References

Dunnett, Charles, Algorithm AS 251, Multivariate Normal Probability Integrals with Product Correlation Structure, Applied Statistics, 1989

Examples

    library(mvtnormpcs)
    N <- 3

    rho <- 0.5
    B   <- rep(-5.0,      length=N)
    A   <- rep(5.0,       length=N)
    INF <- rep(2,         length=N)
    BPD <- rep(sqrt(rho), length=N)
    D   <- rep(0.0,       length=N)

    result <- mvstud(0,A,B,BPD,INF,D)
    result

[Package mvtnormpcs version 0.1 Index]