corc: Function to estimate copula using ranks and sub-sampling

View source: R/corc.R

corcR Documentation

Function to estimate copula using ranks and sub-sampling

Description

Takes a sample, its dimension, a sub-sample size, and returns a discrete copula.

Usage

corc(dataframe, varnames, subsampsize, nbsafe=5,mixties=FALSE,nthreads=2)

Arguments

dataframe

a data frame, containing the observations

varnames

the name of the variables we want to estimate the dependence between

subsampsize

the sub-sample size

nbsafe

the ratio between the number of sub-samples and the cardinality of the discretized copula.

mixties

if TRUE, put equal weight on tied values, using random permutations

nthreads

number of number of threads, assumed to be strictly positive. For "full throttle" computations, consider using parallel::detectCores()

Value

cop

an array representing the discretized copula

ties

the number of sub-samples with a tie

nsubsampreal

the effective number of sub-samples drawn

varnames

the name of the variables studied

nnm

the number of observations without missing values

Author(s)

Jerome Collet

Examples

lon <- 30
a <- 2
x <- rnorm(lon)
y = a*x^2+rnorm(lon)
datatable = as.data.frame(cbind(x,y))
c=corc(datatable,c("x","y"),8)
c
sum(c$cop)

subrank documentation built on April 6, 2023, 1:11 a.m.