gofCheckTime {gofCopula}R Documentation

Combining function for tests

Description

The computation of a gof test can take very long, especially when the number of bootstrap rounds is high. The function gofCheckTime computes the time which the estimation most likely takes.

Usage

gofCheckTime(
  copula,
  x,
  tests = NULL,
  customTests = NULL,
  param = 0.5,
  param.est = TRUE,
  df = 4,
  df.est = TRUE,
  margins = "ranks",
  flip = 0,
  M = 1000,
  MJ = 100,
  dispstr = "ex",
  print.res = TRUE,
  m = 1,
  delta.J = 0.5,
  nodes.Integration = 12,
  lower = NULL,
  upper = NULL,
  seed.active = NULL,
  processes = 1
)

Arguments

copula

A character vector which indicates the copula to test for. Possible are "normal", "t", "clayton", "gumbel", "frank", "joe", "amh", "galambos", "huslerReiss", "tawn", "tev", "fgm" and "plackett".

x

A matrix containing the data with rows being observations and columns being variables.

tests

A character vector which indicates the test to use.

customTests

A character vector which indicates the customized test to use, if any.

param

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

param.est

Shall be either TRUE or FALSE. TRUE means that param will be estimated.

df

The degrees of freedom, if not meant to be estimated. Only necessary if tested for "t"-copula. For the "gofPIOSTn" test the entry is limited to 60 degrees of freedom for computational reasons.

df.est

Indicates if df shall be estimated. Has to be either FALSE or TRUE, where TRUE means that it will be estimated. For the "gofPIOSTn" test the estimate is limited to 60 degrees of freedom for computational reasons.

margins

Specifies which estimation method for the margins shall be used. The default is "ranks", which is the standard approach to convert data in such a case. Alternatively the following distributions can be specified: "beta", "cauchy", Chi-squared ("chisq"), "f", "gamma", Log normal ("lnorm"), Normal ("norm"), "t", "weibull", Exponential ("exp"). Input can be either one method, e.g. "ranks", which will be used for estimation of all data sequences. Also an individual method for each margin can be specified, e.g. c("ranks", "norm", "t") for 3 data sequences. If one does not want to estimate the margins, set it to NULL.

flip

The control parameter to flip the copula by 90, 180, 270 degrees clockwise. Only applicable for bivariate copula. Default is 0 and possible inputs are 0, 90, 180, 270 and NULL.

M

The number of bootstrapping rounds which shall be later taken in the estimation.

MJ

Just for the test gofKernel. Size of bootstrapping sample.

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 copula.

print.res

Logical which defines if the resulting time shall be printed or given as value. Default is TRUE.

m

Length of blocks. Only necessary if the test gofPIOSTn is part of testset.

delta.J

Scaling parameter for the matrix of smoothing parameters. Only necessary if the test gofKernel is part of testset.

nodes.Integration

Number of knots of the bivariate Gauss-Legendre quadrature. Only necessary if the test gofKernel is part of testset.

lower

Lower bound for the maximum likelihood estimation of the copula parameter. The constraint is also active in the bootstrapping procedure. The constraint is not active when a switch to inversion of Kendall's tau is necessary. Default NULL.

upper

Upper bound for the maximum likelihood estimation of the copula parameter. The constraint is also active in the bootstrapping procedure. The constraint is not active when a switch to inversion of Kendall's tau is necessary. Default NULL.

seed.active

Has to be either an integer or a vector of M+1 integers. If an integer, then the seeds for the bootstrapping procedure will be simulated. If M+1 seeds are provided, then these seeds are used in the bootstrapping procedure. Defaults to NULL, then R generates the seeds from the computer runtime. Controlling the seeds is useful for reproducibility of a simulation study to compare the power of the tests or for reproducibility of an empirical study.

processes

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

Details

The function estimates the time which the entire gof test will take.

Examples


## Not run: 
data(IndexReturns2D)

gofCheckTime("normal", IndexReturns2D, "gofKendallKS", M = 10000)

## End(Not run)


[Package gofCopula version 0.4-1 Index]