Learn R Programming

copula (version 0.99-4)

fgmCopula: Construction of a fgmCopula class object

Description

Constructs a multivariate multiparameter Farlie-Gumbel-Morgenstern copula 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".

References

R.B. Nelsen (2006), An introduction to Copulas, Springer, New York.

See Also

Copula, copula-class, fitCopula.

Examples

Run this code
## a bivariate example
fgm.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 values
fgm2.cop <- fgmCopula(c(.2,-.2,-.4,.6), dim = 3)
fgm2.cop

Run the code above in your browser using DataLab