R/internal_functions.R

Defines functions computeDependenceMeasures computeCopula

computeCopula <- function(type, theta) {
  if (type == "Clayton") {
    return(copula::claytonCopula(param = theta, dim = 3))
  } else if (type == "Gumbel") {
    if (theta < 1) {
      stop("Error: For a Gumbel copula, theta must be greater than or equal to 1.", call. = FALSE)
    }
    return(copula::gumbelCopula(param = theta, dim = 3))
  } else {
    stop("Invalid copula type")
  }
}



computeDependenceMeasures <- function(copula) {
  list(kendall = 0.5, spearman = 0.6)  # Placeholder values
}

Try the MOsemiind package in your browser

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

MOsemiind documentation built on April 3, 2025, 9:38 p.m.