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.
gofCheckTime(copula, x, tests, customTests, param = 0.5, param.est = TRUE, df = 4,
df.est = TRUE, margins = "ranks", 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)
A character vector which indicates the copula to test for.
A matrix containing the data with rows being observations and columns being variables.
A character vector which indicates the test to use.
A character vector which indicates the customized test to use, if any.
Logical which defines if the resulting time shall be printed or given as value. Default is TRUE.
The copulae parameters to use for each test, if it shall not be estimated.
Shall be either TRUE
or FALSE
. TRUE
means that param
will be estimated.
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.
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.
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
.
The number of bootstrapping rounds which shall be later taken in the estimation.
Just for the test gofKernel. Size of bootstrapping sample.
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
.
Length of blocks. Only necessary if the test gofPIOSTn
is part of testset
.
Scaling parameter for the matrix of smoothing parameters. Only necessary if the test gofKernel
is part of testset
.
Number of knots of the bivariate Gauss-Legendre quadrature. Only necessary if the test gofKernel
is part of testset
.
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 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
.
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.
The number of parallel processes which are performed to speed up the bootstrapping. Shouldn't be higher than the number of logical processors.
The function estimates the time which the entire gof test will take.
# NOT RUN {
data(IndexReturns2D)
gofCheckTime("normal", IndexReturns2D, "gofKendallKS", M = 10000)
# }
Run the code above in your browser using DataLab