BiCopGofTest: Goodness-of-Fit Test for Bivariate Copulas

View source: R/BiCopGofTest.R

BiCopGofTestR Documentation

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 (Wang and Wells, 2000; Genest et al., 2006). 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
4 = Gumbel copula
5 = Frank copula
6 = Joe copula
7 = BB1 copula (only for method = "kendall")
8 = BB6 copula (only for method = "kendall")
9 = BB7 copula (only for method = "kendall")
10 = BB8 copula (only for method ="kendall")
13 = rotated Clayton copula (180 degrees; ⁠survival Clayton'') \cr `14` = rotated Gumbel copula (180 degrees; ⁠survival Gumbel”)
16 = rotated Joe copula (180 degrees; ⁠survival Joe'') \cr `17` = rotated BB1 copula (180 degrees; ⁠survival BB1”; only for method = "kendall")
18 = rotated BB6 copula (180 degrees; ⁠survival BB6''; only for `method = "kendall"`)\cr `19` = rotated BB7 copula (180 degrees; ⁠survival BB7”; only for method = "kendall")
20 = rotated BB8 copula (180 degrees; “survival BB8”; only for method = "kendall")
'23' = rotated Clayton copula (90 degrees)
'24' = rotated Gumbel copula (90 degrees)
'26' = rotated Joe copula (90 degrees)
'27' = rotated BB1 copula (90 degrees; only for 'method = "kendall"')
'28' = rotated BB6 copula (90 degrees; only for 'method = "kendall"')
'29' = rotated BB7 copula (90 degrees; only for 'method = "kendall"')
'30' = rotated BB8 copula (90 degrees; only for 'method = "kendall"')
'33' = rotated Clayton copula (270 degrees)
'34' = rotated Gumbel copula (270 degrees)
'36' = rotated Joe copula (270 degrees)
'37' = rotated BB1 copula (270 degrees; only for 'method = "kendall"')
'38' = rotated BB6 copula (270 degrees; only for 'method = "kendall"')
'39' = rotated BB7 copula (270 degrees; only for 'method = "kendall"')
'40' = rotated BB8 copula (270 degrees; only for 'method = "kendall"')

par

Copula parameter (optional).

par2

Second parameter for bivariate t-copula (optional); default: par2 = 0.

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

max.df

Numeric; upper bound for the estimation of the degrees of freedom parameter of the t-copula (default: max.df = 30).

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.

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 unstable. 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 proposed by Wang and Wells (2000). For computation of p-values, the parametric bootstrap described by Genest et al. (2006) is used. For rotated copulas the input arguments are transformed and the goodness-of-fit procedure for the corresponding non-rotated copula is used.

Value

For method = "white":

p.value

Asymptotic p-value.

statistic

The observed test statistic.


For method ="kendall"

p.value.CvM

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

p.value.KS

Bootstrapped 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)

Ulf Schepsmeier, Wanling Huang, Jiying Luo, Eike Brechmann

References

Huang, W. and A. Prokhorov (2014). A goodness-of-fit test for copulas. Econometric Reviews, 33 (7), 751-771.

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.

Genest, C., Quessy, J. F., and Remillard, B. (2006). Goodness-of-fit Procedures for Copula Models Based on the Probability Integral Transformation. Scandinavian Journal of Statistics, 33(2), 337-366. Luo J. (2011). Stepwise estimation of D-vines with arbitrary specified copula pairs and EDA tools. Diploma thesis, Technische Universitaet Muenchen.
https://mediatum.ub.tum.de/?id=1079291.

White, H. (1982) Maximum likelihood estimation of misspecified models, Econometrica, 50, 1-26.

See Also

BiCopDeriv2(), BiCopDeriv(), BiCopIndTest(), BiCopVuongClarke()

Examples


# simulate from a bivariate Clayton copula

simdata <- BiCopSim(100, 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
BiCopGofTest(u1, u2, family = 3, method = "kendall", B=50)

# perform Kendall's goodness-of-fit test for the Frank copula
BiCopGofTest(u1, u2, family = 5, method = "kendall", B=50)


tnagler/VineCopula documentation built on March 6, 2024, 5 a.m.