gofTstat | R Documentation |
gofTstat()
computes various goodness-of-fit test statistics
typically used in gofCopula(*, simulation = "pb")
.
gofT2stat()
computes the two-sample goodness of fit test
statistic of Rémillard and Scaillet (2009).
gofTstat(u, method = c("Sn", "SnB", "SnC", "AnChisq", "AnGamma"),
useR = FALSE, ...)
gofT2stat(u1, u2, useR = FALSE)
u |
|
u1 , u2 |
|
method |
a
|
useR |
logical indicating whether an R or C implementation is used. |
... |
additional arguments passed for computing the different test statistics. |
These functions should be used with care. The different test statistics were implemented (partly) for different purposes and goodness-of-fit tests and should be used only with knowledge about such tests (see the references for more details).
The value of the test statistic, a numeric
.
Genest, C., Rémillard, B., and Beaudoin, D. (2009), Goodness-of-fit tests for copulas: A review and a power study Insurance: Mathematics and Economics 44, 199–213.
Rosenblatt, M. (1952), Remarks on a Multivariate Transformation, The Annals of Mathematical Statistics 23, 3, 470–472.
Hering, C. and Hofert, M. (2014), Goodness-of-fit tests for Archimedean copulas in high dimensions, Innovations in Quantitative Risk Management.
Hofert, M., Mächler, M., and McNeil, A. J. (2012). Likelihood inference for Archimedean copulas in high dimensions under known margins. Journal of Multivariate Analysis 110, 133–150.
Rémillard, B. and Scaillet, O. (2009). Testing for equality between two copulas. Journal of Multivariate Analysis 100, 377–386.
gofCopula()
for goodness-of-fit tests where (some of)
the test statistics of gofTstat()
are used.
## generate data
cop <- archmCopula("Gumbel", param=iTau(gumbelCopula(), 0.5), dim=5)
set.seed(1)
U <- rCopula(1000, cop)
## compute Sn (as is done in a parametric bootstrap, for example)
Uhat <- pobs(U) # pseudo-observations
u <- cCopula(Uhat, copula = cop) # Rosenblatt transformed data (with correct copula)
gofTstat(u, method = "Sn", copula = cop) # compute test statistic Sn; requires copula argument
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.