fitbicop: Fit a Bivariate Copula Model

Description Usage Arguments Value Note Examples

Description

These functions choose and fit the best copula model for data with uniform margins. Intended for internal use. fitbicop_qcond not done yet.

Usage

1
2
3
4
5
6
7
8
fitbicop_lh(
  u,
  v,
  families = c("indepcop", "bvncop", "bvtcop", "mtcj", "gum", "frk", "joe", "bb1",
    "bb7", "bb8"),
  cpar = NULL,
  method = "aic"
)

Arguments

u

Vector of Unif(0,1) data.

v

Vector of Unif(0,1) data, same length as u.

families

Vector of copula families to try fitting. Rotations of each family are automatically considered.

method

Either "aic" or "bic" (case doesn't matter)

Value

A list with entries $cop (the best-fitting copula family), $cpar (the fitted copula parameters), and $aic and $bic.

Note

This function is not that smart – it assumes not all cpars are specified, and if some are specified, that the copula model is known.

I'm using BiCopSelect() just because it has smart starting points.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(CopulaModel)
set.seed(13)
u <- runif(100)
v <- qcondbvtcop(runif(100), u, c(0.9, 1))
fitbicop_lh(u, v)
fitbicop_lh(u, v, families = "bvtcop", cpar = c(NA, NA))

v <- qcondgum(runif(100), u, 4)
fitbicop_lh(u, 1-v)

v <- runif(100)
fitbicop_lh(u, v)
fitbicop_lh(u, v, families = "indepcop")

vincenzocoia/copsupp documentation built on Aug. 23, 2020, 7:37 a.m.