xvCopula {copula} | R Documentation

## Model (copula) selection based on `k`-fold cross-validation

### Description

Computes the leave-one-out cross-validation criterion (or a `k`-fold version of it) for the hypothesized parametric copula family using, by default, maximum pseudo-likelihood estimation. The leave-one-out criterion is a crossvalidated log likelihood, denoted xv^n, defined in equation (42) of Grønneberg and Hjort (2014).

For k < n, n the sample size, the `k`-fold version uses k randomly chosen (almost) equally sized data blocks instead of n. When n is large, k-fold is considerably faster (if k is “small” compared to n).

### Usage

    xvCopula(copula, x, k = NULL, verbose = interactive(), ...)

### Arguments

`copula` | object of class `"copula"` representing the hypothesized copula family.
`x` | a data matrix that will be transformed to pseudo-observations.
`k` | the number of data blocks; if `k = NULL`, `nrow(x)` blocks are considered (which corresponds to leave-one-out cross-validation).
`verbose` | a logical indicating if progress of the cross validation should be displayed via `txtProgressBar`.
`...` | additional arguments passed to `fitCopula()`.

### Value

A real number equal to the cross-validation criterion multiplied by the sample size.

### Note

Note that `k`-fold cross-validation with `k < n` shuffles the lines of `x` prior to forming the blocks. The result thus depends on the value of the random seed.

The default estimation method is maximum pseudo-likelihood estimation but this can be changed if necessary along with all the other arguments of `fitCopula()`.

### References

Grønneberg, S., and Hjort, N.L. (2014) The copula information criteria. Scandinavian Journal of Statistics 41, 436–459.

### See Also

`fitCopula()` for the underlying estimation procedure and `gofCopula()` for goodness-of-fit tests.

### Examples

    ## A two-dimensional data example ----------------------------------
    x <- rCopula(200, claytonCopula(3))

    ## Model (copula) selection -- takes time: each fits 200 copulas to 199 obs.
    xvCopula(gumbelCopula(), x)
    xvCopula(frankCopula(), x)
    xvCopula(joeCopula(), x)
    xvCopula(claytonCopula(), x)
    xvCopula(normalCopula(), x)
    xvCopula(tCopula(), x)
    xvCopula(plackettCopula(), x)

    ## The same with 10-fold cross-validation
    set.seed(1) # k-fold is random (for k < n) !
    xvCopula(gumbelCopula(),  x, k=10)
    xvCopula(frankCopula(),   x, k=10)
    xvCopula(joeCopula(),     x, k=10)
    xvCopula(claytonCopula(), x, k=10)
    xvCopula(normalCopula(),  x, k=10)
    xvCopula(tCopula(),       x, k=10)
    xvCopula(plackettCopula(),x, k=10)

[Package copula version 0.999-15 Index]