margCopula | R Documentation |
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
.
margCopula(copula, keep)
copula |
a |
keep |
logical vector (of length |
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.
The marginal copula of the specified margin(s).
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.