BiCopGofKendall: Goodness-of-fit test based on Kendall's process for bivariate...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/BiCopGofKendall.r

Description

This function performs the goodness-of-fit test based on Kendall's process for bivariate copula data. It computes the Cramer-von Mises and Kolmogorov-Smirnov test statistics, respectively, as well as the according p-values using bootstrapping.

Usage

1
BiCopGofKendall(u1, u2, family, B=100, level=0.05)

Arguments

u1,u2

Data vectors of equal length with values in [0,1].

family

An integer defining the bivariate copula family for which the test is performed:
1 = Gaussian copula
2 = Student t copula (t-copula)
3 = Clayton copula
4 = Gumbel copula
5 = Frank copula
6 = Joe copula
7 = BB1 copula
8 = BB6 copula
9 = BB7 copula
10 = BB8 copula
13 = rotated Clayton copula (180 degrees; “survival Clayton”)
14 = rotated Gumbel copula (180 degrees; “survival Gumbel”)
16 = rotated Joe copula (180 degrees; “survival Joe”)
17 = rotated BB1 copula (180 degrees; “survival BB1”)
18 = rotated BB6 copula (180 degrees; “survival BB6”)
19 = rotated BB7 copula (180 degrees; “survival BB7”)
20 = rotated BB8 copula (180 degrees; “survival BB8”)
23 = rotated Clayton copula (90 degrees)
24 = rotated Gumbel copula (90 degrees)
26 = rotated Joe copula (90 degrees)
27 = rotated BB1 copula (90 degrees)
28 = rotated BB6 copula (90 degrees)
29 = rotated BB7 copula (90 degrees)
30 = rotated BB8 copula (90 degrees)
33 = rotated Clayton copula (270 degrees)
34 = rotated Gumbel copula (270 degrees)
36 = rotated Joe copula (270 degrees)
37 = rotated BB1 copula (270 degrees)
38 = rotated BB6 copula (270 degrees)
39 = rotated BB7 copula (270 degrees)
40 = rotated BB8 copula (270 degrees)

B

Integer; number of bootstrap samples (default: B = 100). For B = 0 only the the test statistics are returned. WARNING: If B is chosen too large, computations will take very long.

level

Numeric; significance level of the goodness-of-fit test (default: level = 0.05).

Details

This copula goodness-of-fit test is based on Kendall's process as investigated by Genest and Rivest (1993) and Wang and Wells (2000). For rotated copulas the input arguments are transformed and the goodness-of-fit procedure for the corresponding non-rotated copula is used.

Value

p.value.CvM

P-value of the goodness-of-fit test using the Cramer-von Mises statistic
(if B > 0).

p.value.KS

P-value of the goodness-of-fit test using the Kolmogorov-Smirnov statistic
(if B > 0).

statistic.CvM

The observed Cramer-von Mises test statistic.

statistic.KS

The observed Kolmogorov-Smirnov test statistic.

Author(s)

Jiying Luo, Eike Brechmann

References

Genest, C. and L.-P. Rivest (1993). Statistical inference procedures for bivariate Archimedean copulas. Journal of the American Statistical Association, 88 (423), 1034-1043.

Luo J. (2011). Stepwise estimation of D-vines with arbitrary specified copula pairs and EDA Tools. Diploma thesis, Technische Universitaet Muenchen.
http://mediatum.ub.tum.de/doc/1079291/1079291.pdf.

Wang, W. and M. T. Wells (2000). Model selection and semiparametric inference for bivariate failure-time data. Journal of the American Statistical Association, 95 (449), 62-72.

See Also

BiCopIndTest, BiCopSelect, BiCopVuongClarke, BiCopKPlot, BiCopLambda

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# sample from a Gaussian copula
par1 = 3
fam1 = 3
dat1 = BiCopSim(500,fam1,par1)

## Not run: 
# perform the goodness-of-fit test for the true copula
gof = BiCopGofKendall(dat1[,1],dat1[,2],fam1)
gof$p.value.CvM
gof$p.value.KS

# perform the goodness-of-fit test for the Frank copula
gof = BiCopGofKendall(dat1[,1],dat1[,2],5)
gof$p.value.CvM
gof$p.value.KS

## End(Not run)

Example output

The CDVine package is no longer developed actively.
Please consider using the more general VineCopula package
(see https://CRAN.R-project.org/package=VineCopula),
which extends and improves the functionality of CDVine.

[1] 0.58
[1] 0.68
[1] 0
[1] 0

CDVine documentation built on May 2, 2019, 9:28 a.m.