vineGoF {vines} | R Documentation |
Vine Goodness-of-fit Tests
Description
Goodness-of-fit tests to verify whether the dependence structure of a sample is appropriately modeled by vine model.
Usage
vineGoF(vine, data, method = "PIT", ...)
Arguments
vine |
A |
data |
Data matrix of pseudo-observations. |
method |
Goodness-of-fit method. Supported values:
|
... |
Additional arguments for the goodness-of-fit method. |
Details
The "PIT"
(Probability Integral Transform) method uses the
vinePIT
function to transform the data into variables which
are independent and Uniform(0,1) and then use a hypothesis
test to verify whether the resulting variables are independent and
Uniform(0,1). The additional parameter statistic
specifies
the test to be applied for this purpose.
statistic
Statistic used to verify if the transformed variables are independent and Uniform(0,1). The default value is
"Breymann"
and supported methods are:"Breymann"
Test proposed in the Section 7.1 of (Aas et al., 2009). See (Breymann et al., 2003) for more information.
Value
A vineGoF
or a subclass with specific information about
the goodness-of-fit method used. The statistic
slot of this object
contains the value of the statistic and pvalue
the p-value.
References
Aas, K. and Czado, C. and Frigessi, A. and Bakken, H. (2009) Pair-copula constructions of multiple dependence. Insurance: Mathematics and Economics 44, 182–198.
Breymann, W. and Dias, A. and Embrechts, P. (2003) Dependence structures for multivariate high-frequency data in finance. Quantitative Finance 1, 1–14.
See Also
Examples
copula <- normalCopula(c(-0.25, -0.21, 0.34, 0.51, -0.07, -0.18),
dispstr = "un", dim = 4)
data <- rCopula(100, copula)
selectCopula <- function (vine, j, i, x, y) {
data <- cbind(x, y)
fit <- fitCopula(normalCopula(), data, method = "itau")
fit@copula
}
normalCVine <- vineFit("CVine", data, method = "ml",
selectCopula = selectCopula,
optimMethod = "")@vine
normalDVine <- vineFit("DVine", data, method = "ml",
selectCopula = selectCopula,
optimMethod = "")@vine
show(normalCVine)
show(normalDVine)
normalCVineGof <- vineGoF(normalCVine, data, method = "PIT",
statistic = "Breymann")
normalDVineGof <- vineGoF(normalDVine, data, method = "PIT",
statistic = "Breymann")
show(normalCVineGof)
show(normalDVineGof)