# Hybrid gof test

### Description

`gofHybrid`

combines all tests in this package to perform the hybrid test presented in Zhang et al. (2015). The test gives the possibility to combine several single tests which is helpful since in different test scenarios are different tests the most powerful.

### Usage

1 2 3 4 5 |

### Arguments

`copula` |
The copula to test for. Possible are "normal", "t", "clayton", "gumbel" and "frank". |

`x` |
A matrix containing the residuals of the data. Take into account that the dimension of the matrix must fit the required dimensions from the single tests. |

`testset` |
The tests to be used. Possible are |

`margins` |
Specifies which estimation method shall be used in case that the input data are not in the range [0,1]. The default is |

`dispstr` |
A character string specifying the type of the symmetric positive definite matrix characterizing the elliptical copula. Implemented structures are "ex" for exchangeable and "un" for unstructured, see package |

`M` |
Number of bootstrapping samples in the single tests. |

`execute.times.comp` |
Logical. Defines if the time which the estimation most likely takes shall be computed. It'll be just given if |

`param` |
The copulae parameters to use for each test, if it shall not be estimated. |

`param.est` |
Shall be either |

`df` |
The degrees of freedom, if not meant to be estimated. Only necessary if tested for |

`df.est` |
Indicates if |

`m` |
Length of blocks. Only necessary if the test |

`MJ` |
Size of bootstrapping sample. Only necessary if the test |

`delta.J` |
Scaling parameter for the matrix of smoothing parameters. Only necessary if the test |

`nodes.Integration` |
Number of knots of the bivariate Gauss-Legendre quadrature. Only necessary if the test |

`m_b` |
The power of the statistic. Only necessary if the test |

`zeta.m` |
The adjustment parameter. Only necessary if the test |

`b_Rn` |
The bandwidth for the estimation of the first-order partial derivatives based on the empirical copula. Only necessary if the test |

`processes` |
The number of parallel processes which are performed to speed up the bootstrapping. Shouldn't be higher than the number of logical processors. Please see the details. |

### Details

In most of scenarios for goodness-of-fit tests, including the one for copula models (e.g. Genest et al. (2009)) there exists no single dominate optimal test. Zhang et al. (2015) proposed a hybrid test which performed in their simulation study more desirably compared to the applied single tests.

The p-value is a combination of the single tests in the following way:

*pn^(hybrid) = min(q x min(pn^(1), ..., pn^(q)), 1)*

where *q* is the number of tests and *pn^(i)* the p-value of the test *i*. It is ensured that the hybrid test is consistent as long as at least one of the tests is consistent.

The computation of the individual p-values is performed as described in the details of this tests. Note that the derivation differs.

For small values of `M`

, initializing the parallization via `processes`

does not make sense. The registration of the parallel processes increases the computation time. Please consider to enable parallelization just for high values of `M`

.

### Value

A object of the `class`

gofCOP with the components

`method` |
a character which informs about the performed analysis |

`erg.tests` |
a matrix with the p-values and test statistics of the hybrid and the individual tests |

### References

Zhang, S., Okhrin, O., Zhou, Q., and Song, P.. Goodness-of-fit Test For Specification of Semiparametric Copula Dependence Models. *Journal of Econometrics, 193, 2016, pp. 215-233* dx.doi.org/10.1016/j.jeconom.2016.02.017

Christian Genest, Bruno Remillard, David Beaudoin (2009). Goodness-of-fit tests for copulas: A review and a power study. *Insurance: Mathematics and Economics, Volume 44, Issue 2, April 2009, Pages 199-213, ISSN 0167-6687*. http://dx.doi.org/10.1016/j.insmatheco.2007.10.005

### Examples

1 2 3 4 | ```
data(IndexReturns)
gofHybrid("normal", IndexReturns[c(1:100),c(1:2)],
testset = c("gofRosenblattSnB", "gofRosenblattSnC"), M = 10)
``` |