Learn R Programming

subrank (version 0.9.9.3)

corc: 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)

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

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()

Author

Jerome Collet

Examples

Run this code
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)

Run the code above in your browser using DataLab