View source: R/pacotestRVine.R
pacotestRvineSingleCopula | R Documentation |
The function can be used to test a single copula in a R-vine copula to be a (j-1)-th order partial copula.
To apply the function one needs to provide the data and a specified/estimated R-vine copula model in form of a RVineMatrix from the VineCopula-package.
Additionally, a pacotest options list, which can be generated with the pacotestset
function, needs to be provided.
pacotestRvineSingleCopula(data, RVM, pacotestOptions, tree, copulaNumber)
data |
A (n x d) matrix (or data frame) of [0,1] data (i.e. uniform margins). |
RVM |
An RVineMatrix object (VineCopula-package) which includes the structure, the pair-copula families and parameters of an R-vine copula. |
pacotestOptions |
A options list generated by the |
tree |
The tree number (j>=2) of the copula which should be tested to be a (j-1)-th order partial copula. |
copulaNumber |
The number (1<= copulaNumber <= j-1) of the copula in the normalized RVineMatrix which should be tested to be a (j-1)-th order partial copula. |
A list which can, depending on the chosen test, consist of the following elements:
pValue |
The p-value of the test. |
testStat |
The value of the test statistic. |
decisionTree |
The decision tree used to partition the support Lmabda0 of the conditioning variable W. It is provided as a list consisting of three nodes ( |
S |
The bootstrapped values of the test statistic (only for the test type |
Malte S. Kurz
Kurz, M. S. and F. Spanhel (2022), "Testing the simplifying assumption in high-dimensional vine copulas", Electronic Journal of Statistics 16 (2), pp. 5226-5276.
Spanhel, F. and M. S. Kurz (2019), "Simplified vine copula models: Approximations based on the simplifying assumption", Electronic Journal of Statistics 13 (1), pp. 1254-1291.
pacotest-package
, pacotest
, pacotestset
, pacotestRvineSeq
# Sample data and R-vine copula selection are taken # from the documentation of RVineStructureSelect # of the VineCopula package. # Obtain sample data data(daxreturns, package ="VineCopula") dataSet = daxreturns[1:750,1:4] # Specify an R-vine copula model # (can be obtained by calling: RVM = VineCopula::RVineStructureSelect(dataSet)) vineStructure = matrix(c(3,4,1,2,0,2,4,1,0,0,1,4,0,0,0,4),4,4) families = matrix(c(0,5,2,2,0,0,2,14,0,0,0,14,0,0,0,0),4,4) par = matrix(c(0,0.8230664,0.1933472,0.6275062, 0,0,0.2350109,1.6619945, 0,0,0,1.599363, 0,0,0,0),4,4) par2 = matrix(c(0,0,11.757700,4.547847, 0,0,17.15717,0, 0,0,0,0,0,0,0,0),4,4) RVM = VineCopula::RVineMatrix(vineStructure, families, par, par2) # Specify a pacotestOptions list: # For illustrating the functioning of the decision tree, # grouped scatterplots and a decision tree plot are activated. pacotestOptions = pacotestset(testType='CCC', groupedScatterplots = TRUE, decisionTreePlot = TRUE) # Test for a 2-nd order partial copula # corresponding to the variables BAYN.DE,BMW.DE # and conditioning set ALV.DE,BAS.DE tree = 3 copulaNumber = 1 pacotestResultList = pacotestRvineSingleCopula(dataSet, RVM, pacotestOptions, tree, copulaNumber)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.