Learn R Programming

copula (version 0.999-7)

ellipCopula: Construction of Elliptical Copula Class Object

Description

Constructs an elliptical copula class object with its corresponding parameters and dimension.

Usage

ellipCopula (family, param, dim = 2, dispstr = "ex", df = 4, ...)
normalCopula(param, dim = 2, dispstr = "ex")
    tCopula (param, dim = 2, dispstr = "ex", df = 4, df.fixed = FALSE)

Arguments

family
a character string specifying the family of an elliptical copula. Implemented families are "normal" and "t".
param
a numeric vector specifying the parameter values. The getRho() method accesses this vector, whereas p2P() and getSigma() provide the c
dim
the dimension of the copula.
dispstr
a character string specifying the type of the symmetric positive definite matrix characterizing the elliptical copula. Implemented structures are "ex" for exchangeable, "ar1" for AR(1), "toep" for Toeplitz, and "un" for unstructured.
df
a integer value specifying the number of degrees of freedom of the multivariate t distribution used to construct the t copulas.
df.fixed
logical specifying if the degrees of freedom df will be considered as a parameter (to be estimated) or not. The default, FALSE, means that df is to be estimated if the object is passed as argument to
...
currently nothing.

Value

  • An elliptical copula object of class "normalCopula" or "tCopula".

See Also

p2P(), and getSigma() for construction and extraction of the Rho ($P$) or $Sigma$ matrix of (generalized) correlations.

archmCopula, fitCopula.

Examples

Run this code
norm.cop <- normalCopula(c(0.5, 0.6, 0.7), dim = 3, dispstr = "un")
t.cop <- tCopula(c(0.5, 0.3), dim = 3, dispstr = "toep",
                 df = 2, df.fixed = TRUE)
## from the wrapper
norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),
                        dim = 3, dispstr = "un")
if(require("scatterplot3d")) {
  ## 3d scatter plot of 1000 random observations
  scatterplot3d(rCopula(1000, norm.cop))
  scatterplot3d(rCopula(1000, t.cop))
}

## Versions with unspecified parameters:
tCopula()
allEQ <- function(u,v) all.equal(u, v, tol=0)
stopifnot(allEQ(ellipCopula("norm"), normalCopula()),
          allEQ(ellipCopula("t"), tCopula()))
tCopula(dim=3)
tCopula(dim=4, df.fixed=TRUE)
tCopula(dim=5, disp = "toep", df.fixed=TRUE)
normalCopula(dim=4, disp = "un")

Run the code above in your browser using DataLab