R/stdf.R

Defines functions stdf2 stdf

Documented in stdf stdf2

########################
# Estimators of the stable tail dependence function

# Call C++ and make sure the right input types are used
stdf <- function(x, k, X, alpha = 0.5) {

  # Convert to rank matrix
  R <- apply(as.matrix(X), 2, rank)
  return(.Call("_ReIns_stdf_cpp", as.numeric(x), k, as.matrix(R), alpha,
               PACKAGE = "ReIns"))
}

# Call C++ and make sure the right input types are used
stdf2 <- function(x, k, X) {

  return(.Call("_ReIns_stdf2_cpp", as.numeric(x), k, as.matrix(X),
               PACKAGE = "ReIns"))
}

Try the ReIns package in your browser

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

ReIns documentation built on Nov. 3, 2023, 5:08 p.m.