Cort class
Cort(
x,
p_value_for_dim_red = 0.75,
min_node_size = 1,
pseudo_data = FALSE,
number_max_dim = NULL,
verbose_lvl = 1,
slsqp_options = NULL,
osqp_options = NULL,
N = 999,
force_grid = FALSE
)
The data, must be provided as a matrix with each row as an observation.
a p_value for the localized dimension reduction test
The minimum number of observation available in a leaf to initialize a split.
set to True if you are already providing data on the copula space.
The maximum number of dimension a split occurs in. Defaults to be all of the dimensions.
numeric. set the verbosity. 0 for no output and bigger you set it the most output you get.
options for nloptr::slsqp to find breakpoints : you can change defaults.
options for the weights optimization. You can pass a call to osqp::osqpSettings, or NULL for defaults.
The number of bootstrap samples for p_values computations.
Set to TRUE to force breakpoints to be on the n-checkerboard grid.
An instance of the Cort
S4 class. The object represent the fitted copula and can be used through several methods to query classical (r/d/p/v)Copula methods, constraint influence, etc.
Beside returning some inputted parameters, notable slots are :
data
Your original data
dim
The dimension of problem, number of columns of your dataset
f
The empirical frequency in the leaves
p
The fitted probabilities of each leaf
a
Minimum points of leaves
b
Maximum points of leaves
vols
Volume of the leaves
More details about these slots can be found in the reference.
This class implements the CORT algorithm to a fit a multivariate copula using piece constant density. Given a dataset x
, the function will produce an estimator for the copula of this dataset
that is tree-shaped, by recursive partitioning of the unit hypercube. the min_node_size
parameter controls the stopping conditions for the splitting procedure. Once the space is splitted,
we ran a quadratic solver, which options can be tweaked via the osqp_options
parameter, to ensure that the weights respect the copula conditions.
Once the model is fitted, it can be used through the classical (r/d/p/v)Copula functions to compute, respectively, random number generations, the density, the cdf and the volume function of the copula.
See O. Laverny, E. Masiello, V. Maume-Deschamps and D. Rulli<U+00E8>re (2020) for the details of this density estimation procedure, and vignettes(package='cort')
for examples of usecases.
laverny2020cort
# NOT RUN {
(Cort(LifeCycleSavings[,1:3]))
# }
Run the code above in your browser using DataLab