Learn R Programming

copula (version 0.99-4)

exchTest: Test of exchangeability for a bivariate copula

Description

Test for assessing the exchangeability of the underlying bivariate copula based on the empirical copula. The test statistics are defined in the first two references. Approximate p-values for the test statistics are obtained by means of a multiplier technique.

Usage

exchTest(x, N = 1000, m = 0)

Arguments

x
a data matrix that will be transformed to pseudo-observations.
N
number of multiplier iterations to be used to simulate realizations of the test statistic under the null hypothesis.
m
if m=0, integration in the Cramér--von Mises statistic is carried out with respect to the empirical copula; if m > 0, integration is carried out with respect to the Lebesgue measure and m specifies the size o

Value

  • Returns a list whose attributes are:
  • statisticvalue of the test statistic.
  • pvaluecorresponding approximate p-value.

encoding

UTF-8

Details

More details are available in the two first references.

References

C. Genest, J. Nešlehová and J.-F. Quessy (2012). Tests of symmetry for bivariate copulas. Annals of the Institute of Statistical Mathematics. In press. I. Kojadinovic and J. Yan (2012). A nonparametric test of exchangeability for extreme-value and left-tail decreasing bivariate copulas. The Scandinavian Journal of Statistics. In press.

I. Kojadinovic and J. Yan (2010). Modeling Multivariate Distributions with Continuous Margins Using the copula R Package. Journal of Statistical Software, 34(9), pages 1-20.

See Also

exchEVTest, gofCopula.

Examples

Run this code
## Do these data come from exchangeable copulas? 
exchTest(rcopula(gumbelCopula(3), 200)) 
exchTest(rcopula(claytonCopula(3), 200))

## Creating asymmetric data 
khoudraji <- function(cop,n,a=0.6,b=0.95)
  {
    u <- rcopula(cop,n)
    v <- matrix(runif(2*n),n,2)
    x <- cbind(pmax(u[,1]^(1/a),v[,1]^(1/(1-a))),
               pmax(u[,2]^(1/b),v[,2]^(1/(1-b))))
    x
  }
exchTest(khoudraji(gumbelCopula(3),200))
exchTest(khoudraji(claytonCopula(3),200))

Run the code above in your browser using DataLab