Learn R Programming

VineCopula (version 1.6-1)

BiCopGofTest: Goodness-of-Fit Test for Bivariate Copulas

Description

This function performs a goodness-of-fit test for bivariate copulas, either based on White's information matrix equality (White 1982) as introduced by Huang and Prokhorov (2011) or based on Kendall's process. It computes the test statistics and p-values.

Usage

BiCopGofTest(u1, u2, family, par = 0, par2 = 0, method = "white",
             max.df = 30, B = 100, obj = NULL)

Arguments

u1, u2
Numeric vectors of equal length with values in [0,1].
family
An integer defining the bivariate copula family: 0 = independence copula 1 = Gaussian copula 2 = Student t copula (t-copula) (only for method = "white"; see details) 3 = Clayton copula <
par
Copula parameter (optional).
par2
Second parameter for bivariate t-copula (optional); default: par2 = 0.
max.df
Numeric; upper bound for the estimation of the degrees of freedom parameter of the t-copula (default: max.df = 30).
method
A string indicating the goodness-of-fit method: "white" = goodness-of-fit test based on White's information matrix equality (default) "kendall" = goodness-of-fit test based on Kendall's process
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.
obj
BiCop object containing the family and parameter specification.

Value

  • For method = "white":
  • p.valueAsymptotic p-value.
  • statisticThe observed test statistic.
  • For method = "kendall"
  • p.value.CvMBootstrapped p-value of the goodness-of-fit test using the Cramer-von Mises statistic (if B > 0).
  • p.value.KSBootstrapped p-value of the goodness-of-fit test using the Kolmogorov-Smirnov statistic (if B > 0).
  • statistic.CvMThe observed Cramer-von Mises test statistic.
  • statistic.KSThe observed Kolmogorov-Smirnov test statistic.

Details

method = "white": This goodness-of fit test uses the information matrix equality of White (1982) and was investigated by Huang and Prokhorov (2011). The main contribution is that under correct model specification the Fisher Information can be equivalently calculated as minus the expected Hessian matrix or as the expected outer product of the score function. The null hypothesis is $$H_0: \boldsymbol{H}(\theta) + \boldsymbol{C}(\theta) = 0$$ against the alternative $$H_0: \boldsymbol{H}(\theta) + \boldsymbol{C}(\theta) \neq 0 ,$$ where $\boldsymbol{H}(\theta)$ is the expected Hessian matrix and $\boldsymbol{C}(\theta)$ is the expected outer product of the score function. For the calculation of the test statistic we use the consistent maximum likelihood estimator $\hat{\theta}$ and the sample counter parts of $\boldsymbol{H}(\theta)$ and $\boldsymbol{C}(\theta)$. The correction of the covariance-matrix in the test statistic for the uncertainty in the margins is skipped. The implemented tests assumes that where is no uncertainty in the margins. The correction can be found in Huang and Prokhorov (2011). It involves two-dimensional integrals. WARNING: For the t-copula the test may be instable. The results for the t-copula therefore have to be treated carefully. method = "kendall": 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.

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. Huang, w. and A. Prokhorov (2011). A goodness-of-fit test for copulas. to appear in Econometric Reviews 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/?id=1079291. 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. White, H. (1982) Maximum likelihood estimation of misspecified models, Econometrica, 50, 1-26.

See Also

BiCopDeriv2, BiCopDeriv, BiCopIndTest, BiCopVuongClarke

Examples

Run this code
# simulate from a bivariate Clayton copula
set.seed(123)
simdata <- BiCopSim(300, 3, 2)
u1 <- simdata[,1]
u2 <- simdata[,2]

# perform White's goodness-of-fit test for the true copula
BiCopGofTest(u1, u2, family = 3)

# perform White's goodness-of-fit test for the Frank copula
BiCopGofTest(u1, u2, family = 5)

# perform Kendall's goodness-of-fit test for the true copula
gof <- BiCopGofTest(u1, u2, family = 3, method = "kendall", B=50)
gof$p.value.CvM
gof$p.value.KS

# perform Kendall's goodness-of-fit test for the Frank copula
gof <- BiCopGofTest(u1, u2, family = 5, method = "kendall", B=50)
gof$p.value.CvM
gof$p.value.KS

Run the code above in your browser using DataLab