The copula Package - uni-bayreuth.deftp.uni-bayreuth.de/.../R/CRAN/doc/packages/copula.pdfThe copula...
Transcript of The copula Package - uni-bayreuth.deftp.uni-bayreuth.de/.../R/CRAN/doc/packages/copula.pdfThe copula...
The copula PackageOctober 16, 2007
Version 0.5-8
Date 2007/10/17
Title Multivariate Dependence with Copula
Author Jun Yan <[email protected]>. Independence test and the FGM copula family by IvanKojadinovic <[email protected]>.
Maintainer Jun Yan <[email protected]>
Depends methods, mvtnorm, scatterplot3d, sn, adapt
Enhances nor1mix
Description Classes (S4) of commonly used copulas including elliptical, Archimidean, extreme valueand Farlie-Gumbel-Morgenstern families. Methods for density, distribution, random numbergenerators, bivariate association measures, persp, and contour. Functions for fitting copulamodels. Multivariate independence test based on the empirical copula process.
License GPL version 2 or later.
R topics documented:Copula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Mvdc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3archmCopula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4archmCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6AssocMeasures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7contour-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7copula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8ellipCopula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9ellipCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10empcop.test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11evCopula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13evCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15fgmCopula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16fgmCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1
2 Copula
fitCopula-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18fitCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20mvdc-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20persp-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21plackettCopula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21show-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22summary-methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Index 23
Copula The Copula Distribution
Description
Density, distribution function, and random generation for a "copula" object.
Usage
dcopula(copula, u)pcopula(copula, u)rcopula(copula, n)
Arguments
copula a "copula" object.
u a vector of the copula dimension or a matrix with number of rows being thecopula dimension, giving the coordinates of the points where the density of dis-tribution function need to be evaluated.
n number of observations to be generated.
Details
The density function of an Archimedean copula is obtained by differentiating the distribution func-tion symbolically using D.
The distribution function of a t copula uses pmvt from package mvtnorm. The density function of at copula uses the dmst from package sn.
The random number generator for an Archiimedean copula uses the conditional approach for bi-variate case and the Marshal-Olkin (1988) approach for dimension greater than 2.
Value
’dcopula’ gives the density, ’pcopula’ gives the distribution function, and ’rcopula’ generates ran-dom variates.
Mvdc 3
Author(s)
Jun Yan <[email protected]>
References
Joe (1997), Multivariate Models and Dependence Concepts, Chapman and Hall, London.
Nelsen (1999), An introduction to Copulas, Springer, New York.
See Also
copula-class, ellipCopula, archmCopula, fgmCopula.
Examples
norm.cop <- normalCopula(0.5)norm.copx <- rcopula(norm.cop, 100)plot(x)dcopula(norm.cop, x)pcopula(norm.cop, x)persp(norm.cop, dcopula)contour(norm.cop, pcopula)## a 3-dimensional normal copulau <- rcopula(normalCopula(0.5, dim = 3), 1000)## scatterplot3d(u)## a 3-dimensional clayton copulav <- rcopula(claytonCopula(2, dim = 3), 1000)## scatterplot3d(v)
Mvdc Multivariate Distribution via Copula
Description
Density, distribution function, and random generator for a multivariate distribution via copula.
Usage
mvdc(copula, margins, paramMargins)dmvdc(mvdc, x)pmvdc(mvdc, x)rmvdc(mvdc, n)
4 Mvdc
Arguments
copula an object of copula.
margins a character vector specifying all the marginal distributions. See details below.
paramMargins a list of list with names components, giving the parameter values of the marginaldistributions. See details below.
mvdc a mvdc object.
x a vector of the copula dimension or a matrix with number of rows being thecopula dimension, giving the coordinates of the points where the density of dis-tribution function need to be evaluated.
n number of observations to be generated.
Details
The characters in argument margins are used to construct function names of density, distribution,and quantile functions. For example, "norm" can be used to specify marginal distribution, because"dnorm", "pnorm", and "qnorm" are all available.
Each component list in argument paramMargins is a list with named component which areused to specify the parameters of the marginal distributions. For example, paramMargins =list(list(mean = 0, sd = 2), list(rate = 2)) can be used to specify that thefirst margin is normal with mean 0 and sd 2, and the second margin is exponential with rate 2.
Value
’mvdc’ constructs an object of class "mvdc". ’dmvdc’ gives the density, ’pmvdc’ gives the distri-bution function, and ’rmvdc’ generates random variates.
Author(s)
Jun Yan <[email protected]>
See Also
ellipCopula, archmCopula, mvdc-class, copula-class
Examples
## construct a bivariate distribution whose marginals## are normal and exponential respectively, coupled## together via a normal copulax <- mvdc(normalCopula(0.75), c("norm", "exp"),
list(list(mean = 0, sd =2), list(rate = 2)))x.samp <- rmvdc(x, 100)dmvdc(x, x.samp)pmvdc(x, x.samp)persp(x, dmvdc, xlim = c(-4, 4), ylim=c(0, 1))
archmCopula-class 5
archmCopula-class Class "archmCopula"
Description
Archimedean copula
Objects from the Class
Objects can be created by calls of the form new("archmCopula", ...) or by function’archmCopula’.
Slots
exprdist: Object of class "expression", expressions for the cdf and pdf of the copula.These expressions are used in function ’pcopula’ and ’dcopula’.
dimension: Object of class "numeric"
parameters: Object of class "numeric"
param.names: Object of class "character"
param.lowbnd: Object of class "numeric"
param.upbnd: Object of class "numeric"
message: Object of class "character"
Methods
dcopula signature(copula = "claytonCopula"): ...
pcopula signature(copula = "claytonCopula"): ...
rcopula signature(copula = "claytonCopula"): ...
dcopula signature(copula = "frankCopula"): ...
pcopula signature(copula = "frankCopula"): ...
rcopula signature(copula = "frankCopula"): ...
dcopula signature(copula = "gumbelCopula"): ...
pcopula signature(copula = "gumbelCopula"): ...
rcopula signature(copula = "gumbelCopula"): ...
dcopula signature(copula = "amhCopula"): ...
pcopula signature(copula = "amhCopula"): ...
rcopula signature(copula = "amhCopula"): ...
Extends
Class "archmCopula" extends class "copula" directly. Class "claytonCopula", "frankCopula","gumbelCopula" and "amhCopula" extends class "archmCopula" directly.
6 archmCopula
Note
The expressions of pdf are obtained by differentiating the cdf expression using function ’D’.
"gumbelCopula" is also of class "evCopula".
Author(s)
Jun Yan <[email protected]>
See Also
archmCopula, copula-class.
archmCopula Construction of Archimedean Copula Class Object
Description
Constructs an Archimedean copula class object with its corresponding parameter and dimension.
Usage
archmCopula(family, param, dim = 2, ...)claytonCopula(param, dim = 2)frankCopula(param, dim = 2)gumbelCopula(param, dim = 2)amhCopula(param, dim = 2)
Arguments
family a character string specifying the family of an Archimedean copula. Implementedfamilies are "clayton", "frank", and "gumbel".
param a numeric vector specifying the parameter values.
dim the dimension of the copula.
... currently nothing.
Value
An Archimedean copula object of class "claytonCopula", "frankCopula", "gumbelCopula",or "amhCopula".
Note
"archmCopula" is a wrapper for "claytonCopula", "frankCopula", "gumbelCopula"and "amhCopula".
For dim > 6, the expression of pdf is not available due to intensive compting involved in symboli-cally differentiating the cdf. Therefore, for dim > 6, likelihood estimation cannot be done yet.
AssocMeasures 7
Author(s)
Jun Yan <[email protected]>
See Also
ellipCopula
Examples
clayton.cop <- claytonCopula(2, dim = 3)##scatterplot3d(rcopula(clayton.cop, 1000))frank.cop <- frankCopula(3)persp(frank.cop, dcopula)gumbel.cop <- archmCopula("gumbel", 5)contour(gumbel.cop, dcopula)
AssocMeasures Association Measures in Package ‘copula’
Description
Methods to compute association measures such as Kendall’s Tau, Spearman’s Rho, and tail depen-dence index for bivaraite copulas. Calibration is supplied for Kendall’s Tau and Spearman’s Rho.
Methods
copula = "copula" Association measure for a "copula" object.
contour-methods Methods for Function contour in Package ‘copula’
Description
Methods for function contour in package copula
Details
When x is of class "copula", these arguments can be supplied: fun: the function to be plotted,"dcopula" or "pcopula". n = 51: the number of points to do the plotting. theta = -30, phi =30, expand = 0.618: arguments for "contour"
when x is of class "mvdc", these arguments are expected to replace the effect of n = 51: xlim: therange of the x variable. ylim: the range of the y variable. nx: the number of points for x to expand.ny: the number of points for y to expand.
8 copula-class
Methods
x = "copula" Contour plot for a "copula" object.
x = "mvdc" Contour plot for a "mvdc" object.
Examples
contour(frankCopula(-0.8), dcopula)contour(claytonCopula(2), pcopula)x <- mvdc(gumbelCopula(3), c("norm", "norm"),
list(list(mean = 0, sd =1), list(mean = 1)))contour(x, dmvdc, xlim=c(-2, 2), ylim=c(-1, 3))contour(x, pmvdc, xlim=c(-2, 2), ylim=c(-1, 3))
copula-class Class "copula"
Description
A class of multivariate distribution with uniform margins.
Objects from the Class
Objects can be created by calls of the form new("copula", ...).
Slots
dimension: Object of class "numeric", dimension of the copula.
parameters: Object of class "numeric", parameter values.
param.names: Object of class "character", parameter names.
param.lowbnd: Object of class "numeric", parameter lower bounds.
param.upbnd: Object of class "numeric", parameter upper bounds.
message: Object of class "character", families of the copula.
Warning
This implementation is still at the experimental stage and is subject to change during the develop-ment.
Note
The ’copula’ class is extended by the ’evCopula’, ’archmCopula’ and ’ellipCopula’ classes. Objectsof implemented copulas can be created from functions ’evCopula’, ’archmCopula’ and ’ellipcop-ula’.
"plackettCopula" is a special type of copula which does not belong to either one of the threeclasses above.
ellipCopula-class 9
Author(s)
Jun Yan <[email protected]>
See Also
archmCopula-class, ellipCopula-class, evCopula-class, fgmCopula-class
ellipCopula-class Class "ellipCopula"
Description
Copulas generated from elliptical multivariate distributions.
Objects from the Class
Objects can be created by calls of the form new("ellipCopula", ...), or by function ’el-lipCopula’.
Slots
dispstr: Object of class "character", indicating the type of the dispersion matrix such as’ex’, ’ar1’, ’toep’, or ’un’.
dimension: Object of class "numeric"
parameters: Object of class "numeric"
param.names: Object of class "character"
param.lowbnd: Object of class "numeric"
param.upbnd: Object of class "numeric"
message: Object of class "character"
Extends
Class "ellipCopula" extends class "copula" directly. Class "normalCopula" and "tCopula"extends class "ellipCopula" directly.
Methods
dcopula signature(copula = "normalCopula"): ...
pcopula signature(copula = "normalCopula"): ...
rcopula signature(copula = "normalCopula"): ...
dcopula signature(copula = "tCopula"): ...
pcopula signature(copula = "tCopula"): ...
rcopula signature(copula = "tCopula"): ...
10 ellipCopula
Author(s)
Jun Yan <[email protected]>
See Also
ellipCopula, copula-class.
ellipCopula Construction of Elliptical Copula Class Object
Description
Constructs an elliptical copula class object with its corresponding parameter and dimension.
Usage
ellipCopula(family, param, dim = 2, dispstr = "ex", df = 5, ...)normalCopula(param, dim = 2, dispstr = "ex")tCopula(param, dim = 2, dispstr = "ex", df = 5)
Arguments
family a character string specifying the family of an elliptical copula. Implementedfamilies are "normal" and "t".
param a numeric vector specifying the parameter values.
dim the dimension of the copula.
dispstr a character string specifying the type of the symmetric positive definite matrixcharacterizing the elliptical copula. Implemented structures are "ex" for ex-changeable, "ar1" for AR(1), "toep" for toeplitz, , and "un" for unstructured.For normal copula, this defines the structure of the correlation matrix.
df a numerical value specifying the degree of freedom for the multivariate t distri-bution used to construct the t copulas.
... currently nothing.
Value
An elliptical copula object of class "normalCopula" or "tCopula".
Note
"ellipCopula" is a wrapper for "normalCopula" and "tCopula".
Author(s)
Jun Yan <[email protected]>
empcop.test 11
See Also
archmCopula
Examples
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)## from the wrappernorm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7),
dim = 3, dispstr = "un")## 3d scatter plot of 1000 random observations##scatterplot3d(rcopula(norm.cop, 1000))##scatterplot3d(rcopula(t.cop, 1000))
empcop.test Multivariate independence test based on the empirical copula process
Description
Multivariate independence test based on the empirical copula process as proposed by ChristianGenest and Bruno Rémillard. The test can be seen as composed of three steps: (i) a simulationstep, which consists in simulating the distribution of the test statistics under independence for thesample size under consideration; (ii) the test itself, which consists in computing the approximatep-values of the test statistics with respect to the empirical distributions obtained in step (i); and (iii)the display of a graphic, called a dependogram, enabling to understand the type of departure fromindependence, if any. More details can be found in the articles cited in the reference section.
Usage
empcop.simulate(n, p, m, N = 2000)empcop.test(x, d, m, alpha = 0.05)dependogram(test, pvalues = FALSE)
Arguments
n Sample size when simulating the distribution of the test statistics under indepen-dence.
p Dimension of the data when simulating the distribution of the test statistics underindependence.
m Maximum cardinality of the subsets for which a test statistic is to be computed.It makes sense to consider m << p especially when p is large. In this case,the null hypothesis corresponds to the independence of all sub-random vectorscomposed of at most m variables.
N Number of repetitions when simulating under independence.
x Data frame or data matrix containing realizations (one per line) of the randomvector whose independence is to be tested.
12 empcop.test
d Object of class empcop.distribution as returned by the function empcop.simulate.It can be regarded as the empirical distribution of the test statistics under inde-pendence.
alpha Significance level used in the computation of the critical values for the test statis-tics.
test Object of class empcop.test as return by he function empcop.test.
pvalues Logical indicating whether the dependogram should be drawn from test statisticsor the corresponding p-values.
Details
See the references below for more details, especially the third one.
Value
The function empcop.simulate returns an object of class empcop.distribution whoseattributes are: sample.size, data.dimension, max.card.subsets, number.repetitons,subsets (list of the subsets for which test statistics have been computed), subsets.binary(subsets in binary ’integer’ notation) and dist.statistics.independence (a N line matrixcontaining the values of the test statistics for each subset and each repetition).
The function empcop.test returns an object of class empcop.test whose attributes are:subsets, statistics, critical.values, pvalues, fisher.pvalue (a p-value re-sulting from a combination à la Fisher of the previous p-values), tippett.pvalue (a p-valueresulting from a combination à la Tippett of the previous p-values), alpha (global significancelevel of the test) and beta (1 - beta is the significance level per statistic).
Author(s)
Ivan Kojadinovic, 〈[email protected]〉
References
P. Deheuvels (1979), La fonction de dépendance empirique et ses propriétés: un test non paramétriqued’indépendance, Acad. Roy. Belg. Bull. Cl. Sci. 5th Ser. 65, 274-292.
P. Deheuvels (1981), A non parametric test for independence, Publ. Inst. Statist. Univ. Paris 26,29-50.
C. Genest and B. Rémillard (2004). Tests of independence and randomness based on the empiricalcopula process. Test, 13, 335-369.
C. Genest, J.-F. Quessy and B. Rémillard (2006). Local efficiency of a Cramer-von Mises test ofindependence. Journal of Multivariate Analysis, 97, 274-294.
C. Genest, J.-F. Quessy and B. Rémillard (2007). Asymptotic local efficiency of Cramer-von Misestests for multivariate independence. The Annals of Statistics, 35, in press.
evCopula-class 13
Examples
## Consider the following example taken from## Genest and Remillard (2004), p 352:
x <- matrix(rnorm(500),100,5)x[,1] <- abs(x[,1]) * sign(x[,2] * x[,3])x[,5] <- x[,4]/2 + sqrt(3) * x[,5]/2
## Not run:## In order to test for independence "within" x, the first step consists## in simulating the distribution of the test statistics under## independence for the same sample size and dimension,## i.e. n=100 and p=5. As we are going to consider all the subsets of## {1,...,5} whose cardinality is between 2 and 5, we set m=5.## This may take a while...
d <- empcop.simulate(100,5,5)
## The next step consists in performing the test itself:
test <- empcop.test(x,d,5)
## Let us see the results:
test
## Display the dependogram:
dependogram(test)
## We could have tested for a weaker form of independence, for instance,## by only computing statistics for subsets whose cardinality is between 2## and 3:
test <- empcop.test(x,d,3)testdependogram(test)
## Consider now the following data:y <- matrix(runif(500),100,5)## and perform the test:test <- empcop.test(y,d,3)testdependogram(test)## End(Not run)
## NB: In order to save d for future use, the save function can be used.
evCopula-class Class "evCopula"
14 evCopula-class
Description
Extreme value copula
Objects from the Class
Objects can be created by calls of the form new("evCopula", ...) or by function ’evCop-ula’.
Slots
dimension: Object of class "numeric"
parameters: Object of class "numeric"
param.names: Object of class "character"
param.lowbnd: Object of class "numeric"
param.upbnd: Object of class "numeric"
message: Object of class "character"
Methods
dcopula signature(copula = "galambosCopula"): ...
pcopula signature(copula = "galambosCopula"): ...
rcopula signature(copula = "galambosCopula"): ...
dcopula signature(copula = "huslerReissCopula"): ...
pcopula signature(copula = "huslerReissCopula"): ...
rcopula signature(copula = "huslerReissCopula"): ...
Extends
Class "evCopula" extends class "copula" directly. Class "galambosCopula" and "huslerReissCopula"extends class "evCopula" directly.
Note
The expressions of pdf are obtained by differentiating the cdf expression using function ’deriv’.
"gumbelCopula" is also of class "archmCopula".
Author(s)
Jun Yan <[email protected]>
See Also
evCopula, copula-class.
evCopula 15
evCopula Construction of Extreme Value Copula Class Object
Description
Constructs an extreme value copula class object with its corresponding parameter.
Usage
evCopula(family, param, dim = 2, ...)galambosCopula(param)huslerReissCopula(param)
Arguments
family a character string specifying the family of an extreme value copula. Imple-mented families are "galambos" and "gumbel".
param a numeric vector specifying the parameter values.
dim the dimension of the copula.
... currently nothing.
Value
An extreme value copula object of class "galambosCopula" "gumbelCopula", or "huslerReissCopula".
Note
Gumbel copula is both Archimedean copula and extreme value copula.
Author(s)
Jun Yan <[email protected]>
See Also
ellipCopula, archmCopula
Examples
gumbel.cop <- evCopula("gumbel", param=2)contour(gumbel.cop, dcopula)galambos.cop <- galambosCopula(2)contour(galambos.cop, dcopula)
16 fgmCopula-class
fgmCopula-class Class "fgmCopula"
Description
Multivariate multi-parameter Farlie-Gumbel-Morgenstern copula as defined in Nelsen (1999, p 87).
Objects from the Class
Objects can be created by calls of the form new("fgmCopula", ...).
Slots
exprdist: Object of class "expression", expressions for the cdf and pdf of the copula.These expressions are used in function ’pcopula’ and ’dcopula’.
dimension: Object of class "numeric"
parameters: Object of class "numeric"
param.names: Object of class "character"
param.lowbnd: Object of class "numeric"
param.upbnd: Object of class "numeric"
message: Object of class "character"
Methods
dcopula signature(copula = "fgmCopula"): ...
pcopula signature(copula = "fgmCopula"): ...
rcopula signature(copula = "fgmCopula"): ...
Extends
Class "fgmCopula" extends class "copula" directly.
Note
The verification of the validity of the parameter values is of high complexity and may not work forhigh dimensional copulas.
The random number generation needs to be properly tested, especially for dimensions higher than2.
Author(s)
Ivan Kojadinovic <[email protected]>
References
Nelsen (1999), An introduction to Copulas, Springer, New York.
fgmCopula 17
See Also
copula-class, fgmCopula-class.
fgmCopula Construction of a fgmCopula Class Object
Description
Constructs a multivariate multi-parameter Farlie-Gumbel-Morgenstern copula (see Nelsen 1999, p87) class object with its corresponding parameters and dimension.
Usage
fgmCopula(param, dim = 2)
Arguments
param a numeric vector specifying the parameter values.
dim the dimension of the copula.
... currently nothing.
Value
A Farlie-Gumbel-Morgenstern copula object of class "fgmCopula".
Note
The verification of the validity of the parameter values is of high complexity and may not work forhigh dimensional copulas.
The random number generation needs to be properly tested, especially for dimensions higher than2.
Author(s)
Ivan Kojadinovic <[email protected]>
References
Nelsen (1999), An introduction to Copulas, Springer, New York.
See Also
Copula, copula-class.
18 fitCopula
Examples
## a bivariate examplefgm.cop <- fgmCopula(1)x <-rcopula(fgm.cop, 1000)cor(x,method="kendall")kendallsTau(fgm.cop)cor(x,method="spearman")spearmansRho(fgm.cop)persp(fgm.cop, dcopula)contour(fgm.cop, dcopula)
## a trivariate example with wrong parameter values## fgm2.cop <- fgmCopula(c(1,1,1,1), dim=3)
## a trivariate example with satisfactory parameter valuesfgm2.cop <- fgmCopula(c(.2,-1,-0.3,1), dim=3)fgm2.cop
fitCopula-class Class "fitCopula"
Description
Classes and summaries for fitting copula models.
Objects from the Class
Objects can be created by calls of the form fitCopula, fitMvdc or their summary methods.
Author(s)
Jun Yan <[email protected]>
fitCopula Maximum Likelihood Estimation of Copula Models
Description
Fit a copula model to multivariate data.
Usage
loglikCopula(param, x, copula)loglikMvdc(param, x, mvdc)fitCopula(data, copula, start, lower=NULL, upper=NULL,
optim.control = list(NULL), method = "BFGS")fitMvdc(data, mvdc, start, optim.control = list(NULL), method = "BFGS")
fitCopula 19
Arguments
param a vector of parameter values
x a data matrix
copula a ’copula’ object
mvdc a ’mvdc’ object
data a data matrix
start a vector of starting value for param
lower, upper bounds on the variables for the ’"L-BFGS-B"’ method.optim.control
a list of control to be passed to optim
method the method for optim
Value
The return values of ’loglikCopula’ and ’loglikMvdc’ are the loglikelihood evaluated at the givenvalue of ’param’.
The return values of ’fitCopula’ and ’fitMvdc’ are an object of class ’fitCopula’ and ’fitMvdc’,respectively, containing slots:
est the estimate of the parameters
var.est variance matrix of the estimate
loglik loglikelihood at est
fit the result of optim
Note
When covariates are available for marginal distributions or copula, one can construct loglikelihoodfunction and feed it to optim to estimate all the parameters.
Author(s)
Jun Yan <[email protected]>
References
Yan (2006), Multivariate Modeling with Copulas and Engineering Applications. In Handbook ofEngineering Statistics, Ed. Pham, Springer.
See Also
Copula, mvdc
20 mvdc-class
Examples
gmb <- gumbelCopula(3, dim=2)myMvd <- mvdc(gmb, c("exp","exp"), list(list(rate=2),list(rate=4)))x <- rmvdc(myMvd, 1000)fit <- fitMvdc(x, myMvd, c(1,1,2))fit
generator Generators for Archimedean and EV Copulas
Description
Methods function to evaluate generator function, inverse generator function, and derivatives of gen-erator function.
Methods
copula = "copula" Association measure for a "copula" object.
mvdc-class Class "mvdc"
Description
A class of multivariate distribution via copula.
Objects from the Class
Objects can be created by calls of the form new("mvdc", ...) or by function mvdc.
Slots
copula: Object of class "copula", specifying the copula.
margins: Object of class "character", specifying the marginal distributions.
paramMargins: Object of class "list", a list of list, with eaching list giving the names pa-rameter values of the margins.
Methods
contour signature(x = "mvdc"): ...
persp signature(x = "mvdc"): ...
Author(s)
Jun Yan <[email protected]>
persp-methods 21
See Also
mvdc
persp-methods Methods for Function persp in Package ‘copula’
Description
Methods for function persp in package copula
Details
When x is of class "copula", these arguments can be supplied: fun: the function to be plotted,"dcopula" or "pcopula". n = 51: the number of points to do the plotting. theta = -30, phi =30, expand = 0.618: arguments for "persp"
when x is of class "mvdc", two more arguments are expected to replace the effect of n = 51: xlim:the range of the x variable. ylim: the range of the y variable.
Methods
x = "copula" Perspective plot for a "copula" object.
x = "mvdc" Perspective plot for a "mvdc" object.
Examples
persp(frankCopula(-0.8), dcopula)persp(claytonCopula(2), pcopula)x <- mvdc(gumbelCopula(3), c("norm", "norm"),
list(list(mean = 0, sd =1), list(mean = 1)))persp(x, dmvdc, xlim=c(-2, 2), ylim=c(-1, 3))persp(x, pmvdc, xlim=c(-2, 2), ylim=c(-1, 3))
plackettCopula Construction of Plackett Copula Class Object
Description
Constructs an Plackett copula class object with its corresponding parameter.
Usage
plackettCopula(param)
Arguments
param a numeric vector specifying the parameter values.
22 summary-methods
Value
A Plackett copula object of class "plackettCopula".
Author(s)
Jun Yan <[email protected]>
See Also
ellipCopula, archmCopula
Examples
plackett.cop <- plackettCopula(param=2)tailIndex(plackett.cop)
show-methods Methods for Function show in Package ‘copula’
Description
Methods for function show in package copula.
Methods
object = "copula" describe this method hereobject = "fitCopula" describe this method hereobject = "fitMvdc" describe this method here
Examples
summary-methods Methods for Function summary in Package ‘copula’
Description
Methods for function summary in package copula.
Methods
object = "fitCopula" describe this method hereobject = "fitMvdc" describe this method here
Examples
Index
∗Topic classesarchmCopula-class, 4copula-class, 7ellipCopula-class, 8evCopula-class, 13fgmCopula-class, 15fitCopula-class, 17mvdc-class, 20
∗Topic distributionarchmCopula, 5Copula, 1ellipCopula, 9evCopula, 14fgmCopula, 16Mvdc, 3plackettCopula, 21
∗Topic hplotcontour-methods, 7persp-methods, 20
∗Topic htestempcop.test, 11
∗Topic methodsAssocMeasures, 6contour-methods, 7generator, 19persp-methods, 20show-methods, 22summary-methods, 22
∗Topic modelsfitCopula, 18
∗Topic multivariatearchmCopula, 5AssocMeasures, 6Copula, 1ellipCopula, 9evCopula, 14fgmCopula, 16fitCopula, 18generator, 19
Mvdc, 3plackettCopula, 21
∗Topic printshow-methods, 22
Afun (generator), 19Afun,galambosCopula-method
(generator), 19Afun,gumbelCopula-method
(generator), 19Afun,huslerReissCopula-method
(generator), 19Afun-methods (generator), 19amhCopula (archmCopula), 5amhCopula-class
(archmCopula-class), 4archmCopula, 2, 4, 5, 5, 10, 15, 21archmCopula-class, 8archmCopula-class, 4AssocMeasures, 6
calibKendallsTau (AssocMeasures),6
calibKendallsTau,ANY-method(AssocMeasures), 6
calibKendallsTau,claytonCopula-method(AssocMeasures), 6
calibKendallsTau,copula-method(AssocMeasures), 6
calibKendallsTau,ellipCopula-method(AssocMeasures), 6
calibKendallsTau,gumbelCopula-method(AssocMeasures), 6
calibKendallsTau,normalCopula-method(AssocMeasures), 6
calibKendallsTau,tCopula-method(AssocMeasures), 6
calibKendallsTau-methods(AssocMeasures), 6
23
24 INDEX
calibSpearmansRho(AssocMeasures), 6
calibSpearmansRho,ANY-method(AssocMeasures), 6
calibSpearmansRho,copula-method(AssocMeasures), 6
calibSpearmansRho,ellipCopula-method(AssocMeasures), 6
calibSpearmansRho,normalCopula-method(AssocMeasures), 6
calibSpearmansRho,tCopula-method(AssocMeasures), 6
calibSpearmansRho-methods(AssocMeasures), 6
claytonCopula (archmCopula), 5claytonCopula-class
(archmCopula-class), 4contour,copula-method
(contour-methods), 7contour,mvdc-method
(contour-methods), 7contour-methods, 7Copula, 1, 17, 19copula-class, 2, 4, 5, 9, 14, 16, 17copula-class, 7
dcopula (Copula), 1dcopula,amhCopula-method
(Copula), 1dcopula,claytonCopula-method
(Copula), 1dcopula,fgmCopula-method
(Copula), 1dcopula,frankCopula-method
(Copula), 1dcopula,galambosCopula-method
(Copula), 1dcopula,gumbelCopula-method
(Copula), 1dcopula,huslerReissCopula-method
(Copula), 1dcopula,normalCopula-method
(Copula), 1dcopula,plackettCopula-method
(Copula), 1dcopula,tCopula-method (Copula), 1dependogram (empcop.test), 11dmvdc (Mvdc), 3
ellipCopula, 2, 4, 6, 9, 9, 15, 21ellipCopula-class, 8ellipCopula-class, 8empcop.simulate (empcop.test), 11empcop.test, 11evCopula, 14, 14evCopula-class, 8evCopula-class, 13
fgmCopula, 2, 16fgmCopula-class, 8, 16fgmCopula-class, 15fitCopula, 18fitCopula-class, 17fitMvdc (fitCopula), 18fitMvdc-class (fitCopula-class),
17frankCopula (archmCopula), 5frankCopula-class
(archmCopula-class), 4
galambosCopula (evCopula), 14galambosCopula-class
(evCopula-class), 13generator, 19genFun (generator), 19genFun,amhCopula-method
(generator), 19genFun,claytonCopula-method
(generator), 19genFun,frankCopula-method
(generator), 19genFun,gumbelCopula-method
(generator), 19genFun-methods (generator), 19genFunDer1 (generator), 19genFunDer1,amhCopula-method
(generator), 19genFunDer1,claytonCopula-method
(generator), 19genFunDer1,frankCopula-method
(generator), 19genFunDer1,gumbelCopula-method
(generator), 19genFunDer1-methods (generator), 19genFunDer2 (generator), 19genFunDer2,amhCopula-method
(generator), 19
INDEX 25
genFunDer2,claytonCopula-method(generator), 19
genFunDer2,frankCopula-method(generator), 19
genFunDer2,gumbelCopula-method(generator), 19
genFunDer2-methods (generator), 19genInv (generator), 19genInv,amhCopula-method
(generator), 19genInv,claytonCopula-method
(generator), 19genInv,frankCopula-method
(generator), 19genInv,gumbelCopula-method
(generator), 19genInv-methods (generator), 19gumbelCopula (archmCopula), 5gumbelCopula-class
(archmCopula-class), 4
huslerReissCopula (evCopula), 14huslerReissCopula-class
(evCopula-class), 13
kendallsTau (AssocMeasures), 6kendallsTau,amhCopula-method
(AssocMeasures), 6kendallsTau,ANY-method
(AssocMeasures), 6kendallsTau,archmCopula-method
(AssocMeasures), 6kendallsTau,claytonCopula-method
(AssocMeasures), 6kendallsTau,copula-method
(AssocMeasures), 6kendallsTau,fgmCopula-method
(AssocMeasures), 6kendallsTau,frankCopula-method
(AssocMeasures), 6kendallsTau,gumbelCopula-method
(AssocMeasures), 6kendallsTau,normalCopula-method
(AssocMeasures), 6kendallsTau,tCopula-method
(AssocMeasures), 6kendallsTau-methods
(AssocMeasures), 6
loglikCopula (fitCopula), 18loglikMvdc (fitCopula), 18
Mvdc, 3mvdc, 19, 20mvdc (Mvdc), 3mvdc-class, 4mvdc-class, 20
normalCopula (ellipCopula), 9normalCopula-class
(ellipCopula-class), 8
pcopula (Copula), 1pcopula,amhCopula-method
(Copula), 1pcopula,claytonCopula-method
(Copula), 1pcopula,fgmCopula-method
(Copula), 1pcopula,frankCopula-method
(Copula), 1pcopula,galambosCopula-method
(Copula), 1pcopula,gumbelCopula-method
(Copula), 1pcopula,huslerReissCopula-method
(Copula), 1pcopula,normalCopula-method
(Copula), 1pcopula,plackettCopula-method
(Copula), 1pcopula,tCopula-method (Copula), 1persp,copula-method
(persp-methods), 20persp,mvdc-method
(persp-methods), 20persp-methods, 20plackettCopula, 21plackettCopula-class
(copula-class), 7pmvdc (Mvdc), 3
rcopula (Copula), 1rcopula,amhCopula-method
(Copula), 1rcopula,claytonCopula-method
(Copula), 1rcopula,fgmCopula-method
(Copula), 1
26 INDEX
rcopula,frankCopula-method(Copula), 1
rcopula,galambosCopula-method(Copula), 1
rcopula,gumbelCopula-method(Copula), 1
rcopula,huslerReissCopula-method(Copula), 1
rcopula,normalCopula-method(Copula), 1
rcopula,plackettCopula-method(Copula), 1
rcopula,tCopula-method (Copula), 1rmvdc (Mvdc), 3
show,copula-method(show-methods), 22
show,fitCopula-method(show-methods), 22
show,fitMvdc-method(show-methods), 22
show,normalCopula-method(show-methods), 22
show,tCopula-method(show-methods), 22
show-methods, 22spearmansRho (AssocMeasures), 6spearmansRho,ANY-method
(AssocMeasures), 6spearmansRho,copula-method
(AssocMeasures), 6spearmansRho,fgmCopula-method
(AssocMeasures), 6spearmansRho,frankCopula-method
(AssocMeasures), 6spearmansRho,normalCopula-method
(AssocMeasures), 6spearmansRho,tCopula-method
(AssocMeasures), 6spearmansRho-methods
(AssocMeasures), 6summary,fitCopula-method
(summary-methods), 22summary,fitMvdc-method
(summary-methods), 22summary-methods, 22summaryFitCopula-class
(fitCopula-class), 17
summaryFitMvdc-class(fitCopula-class), 17
tailIndex (AssocMeasures), 6tailIndex,ANY-method
(AssocMeasures), 6tailIndex,claytonCopula-method
(AssocMeasures), 6tailIndex,copula-method
(AssocMeasures), 6tailIndex,evCopula-method
(AssocMeasures), 6tailIndex,frankCopula-method
(AssocMeasures), 6tailIndex,gumbelCopula-method
(AssocMeasures), 6tailIndex,normalCopula-method
(AssocMeasures), 6tailIndex,tCopula-method
(AssocMeasures), 6tailIndex-methods
(AssocMeasures), 6tCopula (ellipCopula), 9tCopula-class
(ellipCopula-class), 8