Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ggraph-tools

Computations for Graphical GOF Test via Pairwise Rosenblatt Transforms


Description

Tools for computing a graphical goodness-of-fit (GOF) test based on pairwise Rosenblatt transformed data.

pairwiseCcop()

computes a (n,d,d)-array which contains pairwise Rosenblatt-transformed data.

pairwiseIndepTest()

takes such an array as input and computes a (d,d)-matrix of test results from pairwise tests of independence (as by indepTest()).

pviTest()

can be used to extract the matrix of p-values from the return matrix of pairwiseIndepTest().

gpviTest()

takes such a matrix of p-values and computes a global p-value with the method provided.

Usage

pairwiseCcop(u, copula, ...)
pairwiseIndepTest(cu.u, N=256,
        iTest = indepTestSim(n, p=2, m=2, N=N, verbose = idT.verbose, ...),
        verbose=TRUE, idT.verbose = verbose, ...)

 pviTest(piTest)
gpviTest(pvalues, method=p.adjust.methods, globalFun=min)

Arguments

u

(n,d)-matrix of copula data.

copula

copula object used for the Rosenblatt transform (H[0] copula).

...

additional arguments passed to the internal function which computes the conditional copulas (for pairwiseCcop()). Can be used to pass, for example, the degrees of freedom parameter df for t-copulas.

For pairwiseIndepTest(), ... are passed to indepTestSim().

cu.u

(n,d,d)-array as returned by pairwiseCcop().

N

argument of indepTestSim().

iTest

the result of (a version of) indepTestSim(); as it does not depend on the data, and is costly to compute, it can be computed separately and passed here.

verbose

integer (or logical) indicating if and how much progress should be printed during the computation of the tests for independence.

idT.verbose

logical, passed as verbose argument to indepTestSim().

piTest

(d,d)-matrix of indepTest objects as returned by pairwiseIndepTest().

pvalues

(d,d)-matrix of p-values.

method

character vector of adjustment methods for p-values; see p.adjust.methods for more details.

globalFun

function determining how to compute a global p-value from a matrix of pairwise adjusted p-values.

Value

pairwiseCcop

(n,d,d)-array cu.u with cu.u[i,j] containing C(u[,i]|u[,j]) for i!=j and u[,i] for i=j.

pairwiseIndepTest

(d,d)-matrix of lists with test results as returned by indepTest(). The test results correspond to pairwise tests of independence as conducted by indepTest().

pviTest

(d,d)-matrix of p-values.

gpviTest

global p-values for the specified methods.

Note

If u are distributed according to or “perfectly” sampled from a copula, p-values on GOF tests for that copula should be uniformly distributed in [0,1].

References

Hofert and Mächler (2014), see pairsRosenblatt.

See Also

pairsRosenblatt for where these tools are used, including demo(gof_graph) for examples.

Examples

## demo(gof_graph)

copula

Multivariate Dependence with Copulas

v1.0-1
GPL (>= 3) | file LICENCE
Authors
Marius Hofert [aut] (<https://orcid.org/0000-0001-8009-4665>), Ivan Kojadinovic [aut] (<https://orcid.org/0000-0002-2903-1543>), Martin Maechler [aut, cre] (<https://orcid.org/0000-0002-8685-9910>), Jun Yan [aut] (<https://orcid.org/0000-0003-4401-7296>), Johanna G. Nešlehová [ctb] (evTestK(), <https://orcid.org/0000-0001-9634-4796>), Rebecca Morger [ctb] (fitCopula.ml(): code for free mixCopula weight parameters)
Initial release
2020-12-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.