This function estimates the parameter(s) of a bivariate copula using either inversion of empirical Kendall's tau (for one parameter copula families only) or maximum likelihood estimation for implemented copula families.

BiCopEst(
  u1,
  u2,
  family,
  method = "mle",
  se = FALSE,
  max.df = 30,
  max.BB = list(BB1 = c(5, 6), BB6 = c(6, 6), BB7 = c(5, 6), BB8 = c(6, 1)),
  weights = NA
)

Arguments

u1, u2

Data vectors of equal length with values in \([0,1]\).

family

An integer defining the bivariate copula family:
0 = independence copula
1 = Gaussian copula
2 = Student t copula (t-copula)
3 = Clayton copula
4 = Gumbel copula
5 = Frank copula
6 = Joe copula
7 = BB1 copula
8 = BB6 copula
9 = BB7 copula
10 = BB8 copula
13 = rotated Clayton copula (180 degrees; survival Clayton'') \cr `14` = rotated Gumbel copula (180 degrees; survival Gumbel'')
16 = rotated Joe copula (180 degrees; survival Joe'') \cr `17` = rotated BB1 copula (180 degrees; survival BB1'')
18 = rotated BB6 copula (180 degrees; survival BB6'')\cr `19` = rotated BB7 copula (180 degrees; survival BB7'')
20 = rotated BB8 copula (180 degrees; ``survival BB8'')
23 = rotated Clayton copula (90 degrees)
`24` = rotated Gumbel copula (90 degrees)
`26` = rotated Joe copula (90 degrees)
`27` = rotated BB1 copula (90 degrees)
`28` = rotated BB6 copula (90 degrees)
`29` = rotated BB7 copula (90 degrees)
`30` = rotated BB8 copula (90 degrees)
`33` = rotated Clayton copula (270 degrees)
`34` = rotated Gumbel copula (270 degrees)
`36` = rotated Joe copula (270 degrees)
`37` = rotated BB1 copula (270 degrees)
`38` = rotated BB6 copula (270 degrees)
`39` = rotated BB7 copula (270 degrees)
`40` = rotated BB8 copula (270 degrees)
`104` = Tawn type 1 copula
`114` = rotated Tawn type 1 copula (180 degrees)
`124` = rotated Tawn type 1 copula (90 degrees)
`134` = rotated Tawn type 1 copula (270 degrees)
`204` = Tawn type 2 copula
`214` = rotated Tawn type 2 copula (180 degrees)
`224` = rotated Tawn type 2 copula (90 degrees)
`234` = rotated Tawn type 2 copula (270 degrees)

method

indicates the estimation method: either maximum likelihood estimation (method = "mle"; default) or inversion of Kendall's tau (method = "itau"). For method = "itau" only one parameter families and the Student t copula can be used (family = 1,2,3,4,5,6,13,14,16,23,24,26,33,34 or 36). For the t-copula, par2 is found by a crude profile likelihood optimization over the interval (2, 10].

se

Logical; whether standard error(s) of parameter estimates is/are estimated (default: se = FALSE).

max.df

Numeric; upper bound for the estimation of the degrees of freedom parameter of the t-copula (default: max.df = 30).

max.BB

List; upper bounds for the estimation of the two parameters (in absolute values) of the BB1, BB6, BB7 and BB8 copulas
(default: max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1))).

weights

Numerical; weights for each observation (optional).

Value

An object of class BiCop(), augmented with the following entries:

se, se2

standard errors for the parameter estimates (if se = TRUE,

nobs

number of observations,

logLik

log likelihood

AIC

Aikaike's Informaton Criterion,

BIC

Bayesian's Informaton Criterion,

emptau

empirical value of Kendall's tau,

p.value.indeptest

p-value of the independence test.

Details

If method = "itau", the function computes the empirical Kendall's tau of the given copula data and exploits the one-to-one relationship of copula parameter and Kendall's tau which is available for many one parameter bivariate copula families (see BiCopPar2Tau() and BiCopTau2Par()). The inversion of Kendall's tau is however not available for all bivariate copula families (see above). If a two parameter copula family is chosen and method = "itau", a warning message is returned and the MLE is calculated.

For method = "mle" copula parameters are estimated by maximum likelihood using starting values obtained by method = "itau". If no starting values are available by inversion of Kendall's tau, starting values have to be provided given expert knowledge and the boundaries max.df and max.BB respectively. Note: The MLE is performed via numerical maximization using the L_BFGS-B method. For the Gaussian, the t- and the one-parametric Archimedean copulas we can use the gradients, but for the BB copulas we have to use finite differences for the L_BFGS-B method.

A warning message is returned if the estimate of the degrees of freedom parameter of the t-copula is larger than max.df. For high degrees of freedom the t-copula is almost indistinguishable from the Gaussian and it is advised to use the Gaussian copula in this case. As a rule of thumb max.df = 30 typically is a good choice. Moreover, standard errors of the degrees of freedom parameter estimate cannot be estimated in this case.

Note

For a comprehensive summary of the fitted model, use summary(object); to see all its contents, use str(object).

References

Joe, H. (1997). Multivariate Models and Dependence Concepts. Chapman and Hall, London.

Author

Ulf Schepsmeier, Eike Brechmann, Jakob Stoeber, Carlos Almeida

Examples


## Example 1: bivariate Gaussian copula
dat <- BiCopSim(500, 1, 0.7)
u1 <- dat[, 1]
v1 <- dat[, 2]

# estimate parameters of Gaussian copula by inversion of Kendall's tau
est1.tau <- BiCopEst(u1, v1, family = 1, method = "itau")
est1.tau  # short overview
#> Bivariate copula: Gaussian (par = 0.66, tau = 0.46) 
summary(est1.tau)  # comprehensive overview
#> Family
#> ------ 
#> No:    1
#> Name:  Gaussian
#> 
#> Parameter(s)
#> ------------
#> par:  0.66
#> 
#> Dependence measures
#> -------------------
#> Kendall's tau:    0.46 (empirical = 0.46, p value < 0.01)
#> Upper TD:         0 
#> Lower TD:         0 
#> 
#> Fit statistics
#> --------------
#> logLik:  139.87 
#> AIC:    -277.74 
#> BIC:    -273.53 
#> 
str(est1.tau)  # see all contents of the object
#> List of 15
#>  $ family           : num 1
#>  $ par              : num 0.663
#>  $ par2             : num 0
#>  $ npars            : num 1
#>  $ familyname       : chr "Gaussian"
#>  $ tau              : num 0.461
#>  $ beta             : num 0.461
#>  $ taildep          :List of 2
#>   ..$ lower: num 0
#>   ..$ upper: num 0
#>  $ call             : language BiCopEst(u1 = u1, u2 = v1, family = 1, method = "itau")
#>  $ nobs             : int 500
#>  $ logLik           : num 140
#>  $ AIC              : num -278
#>  $ BIC              : num -274
#>  $ emptau           : num 0.461
#>  $ p.value.indeptest: num 0
#>  - attr(*, "class")= chr "BiCop"

# check if parameter actually coincides with inversion of Kendall's tau
tau1 <- cor(u1, v1, method = "kendall")
all.equal(BiCopTau2Par(1, tau1), est1.tau$par)
#> [1] TRUE

# maximum likelihood estimate for comparison
est1.mle <- BiCopEst(u1, v1, family = 1, method = "mle")
summary(est1.mle)
#> Family
#> ------ 
#> No:    1
#> Name:  Gaussian
#> 
#> Parameter(s)
#> ------------
#> par:  0.68
#> 
#> Dependence measures
#> -------------------
#> Kendall's tau:    0.47 (empirical = 0.46, p value < 0.01)
#> Upper TD:         0 
#> Lower TD:         0 
#> 
#> Fit statistics
#> --------------
#> logLik:  140.06 
#> AIC:    -278.11 
#> BIC:    -273.9 
#> 


## Example 2: bivariate Clayton and survival Gumbel copulas
# simulate from a Clayton copula
dat <- BiCopSim(500, 3, 2.5)
u2 <- dat[, 1]
v2 <- dat[, 2]

# empirical Kendall's tau
tau2 <- cor(u2, v2, method = "kendall")

# inversion of empirical Kendall's tau for the Clayton copula
BiCopTau2Par(3, tau2)
#> [1] 2.222944
BiCopEst(u2, v2, family = 3, method = "itau")
#> Bivariate copula: Clayton (par = 2.22, tau = 0.53) 

# inversion of empirical Kendall's tau for the survival Gumbel copula
BiCopTau2Par(14, tau2)
#> [1] 2.111472
BiCopEst(u2, v2, family = 14, method = "itau")
#> Bivariate copula: Survival Gumbel (par = 2.11, tau = 0.53) 

# maximum likelihood estimates for comparison
BiCopEst(u2, v2, family = 3, method = "mle")
#> Bivariate copula: Clayton (par = 2.28, tau = 0.53) 
BiCopEst(u2, v2, family = 14, method = "mle")
#> Bivariate copula: Survival Gumbel (par = 2.15, tau = 0.54)