margCopula {copula}R Documentation

Marginal copula of a Copula With Specified Margins

Description

The marginal copula of a copula C(u_1,\dots, u_d) is simply the restriction of C on a subset of the the coordinate (directions) u_1,\dots,u_d.

Usage

margCopula(copula, keep)

Arguments

copula

a "copula" (R object) of dimension, d, say.

keep

logical vector (of length d) indicating which margins to keep.

Details

The marginal copula of a copula is needed in practical data analysis when one or more of the components of some multivariate observations is missing. For normal/t/Archimedean copulas, the marginal copulas can be easily obtained. For a general copula, this may not be an easy problem.

The current implementation only supports normal/t/Archimedean copulas. margCopula is generic function with methods for the different copula classes.

Value

The marginal copula of the specified margin(s).

Examples

tc <- tCopula(8:2 / 10, dim = 8, dispstr = "toep")
margCopula(tc, c(TRUE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE))

nc <- normalCopula(.8, dim = 8, dispstr = "ar1")
mnc <- margCopula(nc, c(TRUE, TRUE, FALSE, TRUE, FALSE, FALSE, TRUE, FALSE))
mnc7 <- margCopula(nc, (1:8) != 1)
stopifnot(dim(nc) == 8, dim(mnc) == 4, dim(mnc7) == 7)

gc <- gumbelCopula(2, dim = 8)
margCopula(gc, c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE))

[Package copula version 1.1-3 Index]