cbkmCopula contructor

cbkmCopula(
  x,
  m = rep(nrow(x), ncol(x)),
  pseudo = FALSE,
  margins_numbers = NULL,
  known_cop = NULL
)

Arguments

x

the data to be used

m

checkerboard parameter

pseudo

Boolean, defaults to FALSE. Set to TRUE if you are already providing pseudo-data into the x argument.

margins_numbers

numeric integers which determines the margins for the known copula.

known_cop

Copula a copula object representing the known copula for the selected margins.

Value

An instance of the cbkmCopula S4 class. The object represent the fitted copula and can be used through several methods to query classical (r/d/p/v)Copula methods, etc.

Details

Given some empirical data, and given some known copula estimation on a sub-vector of this data, the checkerboard with known margins construction consist in a conditional pattern where a checkerboard copula is fitted (similar the the cbCopula algorithm), but conditionally on some known margins.

See the corresponding vignette for more details.

Examples

dataset <- apply(LifeCycleSavings,2,rank)/(nrow(LifeCycleSavings)+1)
known_copula <- cbCopula(dataset[,2:3],m=10)
(cop <- cbkmCopula(x = dataset,
                  m = 5,
                  pseudo = TRUE,
                  margins_numbers = c(2,3),
                  known_cop = known_copula))
#> This is a cbkmCopula , with : 
#>    dim = 5 
#>    n = 50 
#>    m = 5 5 5 5 5 
#> The variables names are :  sr pop15 pop75 dpi ddpi 
#> The variables  2 3  have a known copula  given by :
#> 	This is a cbCopula , with : 
#> 	   dim = 2 
#> 	   n = 50 
#> 	   m = 10 10 
#> 	The variables names are :  pop15 pop75