Learn R Programming

copula (version 0.9-5)

multIndepTest: Independence test among continuous random vectors based on the empirical copula process

Description

Analog of the independence test based on the empirical copula process proposed by Christian Genest and Bruno R�millard (see indepTest) for random vectors. The main difference comes from the fact that critical values and p-values are obtainted through the bootstrap/permutation methodology, since, here, test statistics are not distribution-free.

Usage

multIndepTest(x, d, m=length(d), N=1000, alpha=0.05, print.every = 100)

Arguments

x
Data frame or data matrix containing realizations (one per line) of the random vectors whose independence is to be tested.
d
Dimensions of the random vectors whose realizations are given in x. It is required that sum(d)=ncol(x).
m
Maximum cardinality of the subsets of random vectors for which a test statistic is to be computed. It makes sense to consider m << p especially when p is large.
N
Number of bootstrap/permutation samples.
alpha
Significance level used in the computation of the critical values for the test statistics.
print.every
Progress is printed every "print.every" iterations. No progress is printed if it is nonpositive.

Value

  • The function "multIndepTest" returns an object of class "indepTest" whose attributes are: subsets, statistics, critical.values, pvalues, fisher.pvalue (a p-value resulting from a combination � la Fisher of the subset statistic p-values), tippett.pvalue (a p-value resulting from a combination � la Tippett of the subset statistic p-values), alpha (global significance level of the test), beta (1 - beta is the significance level per statistic), global.statistic (value of the global Cram�r-von Mises statistic derived directly from the independence empirical copula process - see In in the last reference) and global.statistic.pvalue (corresponding p-value).

encoding

latin1

Details

See the references below for more details, especially the last one.

References

P. Deheuvels (1979). La fonction de d�pendance empirique et ses propri�t�s: un test non param�trique d'ind�pendance, Acad. Roy. Belg. Bull. Cl. Sci., 5th Ser. 65:274--292. P. Deheuvels (1981), A non parametric test for independence, Publ. Inst. Statist. Univ. Paris. 26:29--50. C. Genest and B. R�millard (2004), Tests of independence and randomness based on the empirical copula process. Test, 13:335--369. C. Genest, J.-F. Quessy and B. R�millard (2006). Local efficiency of a Cramer-von Mises test of independence, Journal of Multivariate Analysis, 97:274--294. C. Genest, J.-F. Quessy and B. R�millard (2007), Asymptotic local efficiency of Cram�r-von Mises tests for multivariate independence. The Annals of Statistics, 35:166--191. I. Kojadinovic and M. Holmes (2009), Tests of independence among continuous random vectors based on Cram�r-von Mises functionals of the empirical copula process. Journal of Multivariate Analysis, 100:1137--1154.

See Also

indepTest, serialIndepTest, multSerialIndepTest, dependogram.

Examples

Run this code
## Consider the following example taken from
## Kojadinovic and Holmes (2008):

n <- 100

## Generate data
y <- matrix(rnorm(6*n),n,6)
y[,1] <- y[,2]/2 + sqrt(3)/2*y[,1]
y[,3] <- y[,4]/2 + sqrt(3)/2*y[,3]
y[,5] <- y[,6]/2 + sqrt(3)/2*y[,5]
    
nc <- normalCopula(0.3,dim=3)
x <- cbind(y,rcopula(nc,n),rcopula(nc,n))
       
x[,1] <- abs(x[,1]) * sign(x[,3] * x[,5])
x[,2] <- abs(x[,2]) * sign(x[,3] * x[,5])
x[,7] <- x[,7] + x[,10]
x[,8] <- x[,8] + x[,11]
x[,9] <- x[,9] + x[,12]

## Dimensions of the random vectors
d <- c(2,2,2,3,3)

## Run the test
test <- multIndepTest(x,d)
test

## Display the dependogram
dependogram(test,print=TRUE)

Run the code above in your browser using DataLab