Description Usage Arguments Details Value References Examples
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.
1 2 |
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. |
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
.
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 |
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.
1 2 3 | data(IndexReturns)
gofWhite("normal", IndexReturns[c(1:100),c(1:2)], M = 10)
|
Loading required package: copula
Loading required package: foreach
Loading required package: parallel
Loading required package: doParallel
Loading required package: iterators
Loading required package: R.utils
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.21.0 (2016-10-30) successfully loaded. See ?R.oo for help.
Attaching package: 'R.oo'
The following objects are masked from 'package:methods':
getClasses, getMethods
The following objects are masked from 'package:base':
attach, detach, gc, load, save
R.utils v2.5.0 (2016-11-07) successfully loaded. See ?R.utils for help.
Attaching package: 'R.utils'
The following object is masked from 'package:utils':
timestamp
The following objects are masked from 'package:base':
cat, commandArgs, getOption, inherits, isOpen, parse, warnings
Parametric bootstrap goodness-of-fit test with White test and normal
copula
Tests results:
p.value test statistic rho.1
White 0.1 2.198297 0.6265811
Warning message:
In .margins.param.est(copula = copula, margins = margins, x = x, :
The observations aren't in [0,1]. The margins will be estimated by the ranks of the observations.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.