# 2 dimensional gof tests based on White's information matrix equality.

### Description

`gofWhite`

tests a given 2 dimensional dataset for a copula with the gof test based on White's information matrix equality. The possible copulae are "normal", "t", "gumbel", "clayton" and "frank". See for reference Schepsmeier et al. (2015). The parameter estimation is performed with pseudo maximum likelihood method. In case the estimation fails, inversion of Kendall's tau is used. The margins can be estimated by a bunch of distributions and the time which is necessary for the estimation can be given. The approximate p-values are computed with a parametric bootstrap, which computation can be accelerated by enabling in-build parallel computation. The computation of the test statistic and p-values is performed by corresponding functions from the `VineCopula`

package.

### Usage

1 2 |

### Arguments

`copula` |
The copula to test for. Possible are the copulae |

`x` |
A 2 dimensional matrix containing the residuals of the data. |

`M` |
Number of bootstrap samples. |

`param` |
The parameter to be used. |

`param.est` |
Shall be either |

`df` |
The degrees of freedom for the |

`df.est` |
Indicates if |

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

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

`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

The details are obtained from Schepsmeier et al. (2015) who states that this test uses the information matrix equality of White (1982). Under correct model specification is the Fisher Information equivalently calculated as minus the expected Hessian matrix or as the expected outer product of the score function. The null hypothesis is

*H0 : H(theta) + S(theta) = 0*

where *H(theta)* is the expected Hessian matrix and *S(theta)* is the expected outer product of the score function.

The test statistic is derived by

*T_n = n(dbar(theta_n))^T V_(theta_n)^(-1) dbar(theta_n)*

with

*dbar(theta_n) = 1/n sum(vech(H(theta_n|u) + S(theta_n|u)), i=1, ..., n),*

*d(theta_n) = vech(H(theta_n|u) + S(theta_n|u)),*

*Vtheta_n] = 1/n sum(d(theta_n) - D(theta_n) H_n(theta_n)^(-1) d l(theta_n)d(theta_n) - D(theta_n) H_n(theta_n)^(-1) d l(theta_n)^T, i=1, ..., n)*

and

*D(theta_n = 1/n sum(d_(theta_k) d[l](theta_n)_(l=1, ...,(p(p+1))/2, k=1, ..., p), i=1, ..., n)*

where *l(theta_n)* represents the log likelihood function and *p* is the length of the parameter vector *theta*.

The test statistic will be rejected if

*T > (1 - alpha) (chi^2_(p(p+1)/2))^(-1).*

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-value and test statistic of test |

### References

Ulf Schepsmeier, Jakob Stoeber, Eike Christian Brechmann, Benedikt Graeler (2015). VineCopula: Statistical Inference of Vine Copulas. *R package version 1.4.*. https://cran.r-project.org/package=VineCopula

Schepsmeier, U. and J. Stoeber (2014). Derivatives and Fisher information of bivariate copulas. *Statistical Papers, 55(2), 525-542.* http://link.springer.com/article/10.1007/s00362-013-0498-x

Stoeber, J. and U. Schepsmeier (2013). Estimating standard errors in regular vine copula models *Computational Statistics, 28 (6), 2679-2707*

Schepsmeier, U. (2015). Efficient information based goodness-of-fit tests for vine copula models with fixed margins. *Journal of Multivariate Analysis 138, 34-52.*
Schepsmeier, U. (2014). A goodness-of-fit test for regular vine copula models.

### Examples

1 2 3 | ```
data(IndexReturns)
gofWhite("normal", IndexReturns[c(1:100),c(1:2)], M = 10)
``` |