R/estimdep.R

Defines functions estimdep

Documented in estimdep

estimdep <- function(dataframe,varnames,subsampsize,nbsafe=5,mixties=FALSE,nthreads=2)
{
  dimension=length(varnames)
  copcomp=corc(dataframe,varnames,subsampsize,nbsafe,mixties,nthreads=nthreads)
  FdRinv <- list()
  FdR <- list()
  for (var in varnames)
  {
    numvar=pmatch(var,varnames)
    values=sort(unlist(dataframe[var]))
    steps=seq(0,1,along.with=values)
    FdRinv[[numvar]]=approxfun(steps,values,rule=2:2)
    FdR[[numvar]]=approxfun(values,steps,rule=2:2)
  }
  if(copcomp$ties>0.5*copcomp$nsubsampreal)
    warning("Too many ties")
  return(list(cop=copcomp$cop,FdRinv=FdRinv,FdR=FdR,varnames=varnames))
} 

Try the subrank package in your browser

Any scripts or data that you put into this service are public.

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