A collection and description of functions to specify the
copula class and to investigate bivariate Frechet copulae.
The class representation and methods are:
fCOPULA | representation for an S4 object of class "fCOPULA", |
show | S4 print method. |
Frechet Copulae:
pfrechetCopula | computes Frechet copula probability. |
# S4 method for fCOPULA
show(object)pfrechetCopula(u = 0.5, v = u, type = c("m", "pi", "w"),
output = c("vector", "list"))
The print method show
returns an S4 object of
class "fCOPULA"
. The object contains the following slots:
the function call.
the name of the copula.
a list whose elements specify the model parameters of the copula.
a character string with the name of the copula. This can be overwritten specifying a user defined input argument.
a character string with an optional user defined description. By default just the current date will be returned.
The function pfrechetCopula
returns a numeric vector of
probabilities. An attribute named "control"
is added
which returns the name of the Frechet copula.
[show] -
an S4 object of class "fCOPULA"
.
[*frechetCopula] -
output - a character string specifying how the output should
be formatted. By default a vector of the same length as u
and v
. If specified as "list"
then u
and
v
are expected to span a two-dimensional grid as outputted
by the function grid2d
and the function returns a list with
elements $x
, y
, and z
which can be directly
used for example by 2D plotting functions.
[*frechetCopula] -
the type of the Frechet copula. A character
string selected from: "m"
, "pi"
, or "w"
.
two numeric values or vectors of the same length at which
the copula will be computed. If u
is a list then the
the $x
and $y
elements will be used as u
and v
. If u
is a two column matrix then the
first column will be used as u
and the the second
as v
.
Diethelm Wuertz for the Rmetrics R-port.
The function pfrechetCopula
returns a numeric matrix of
probabilities computed at grid positions u
|v
. The
arguments u
and v
are two single values or two
numeric vectors of the same length. If v
is not specified
then the same values are taken as for u
. Alternatively,
u
may be given as a two column vector or as a list with
two entries as vectors. The first column or entry is taken as
u
and the second as v
.
## fCOPULA -
getClass("fCOPULA")
## pfrechet -
# The Frechet Copula - m:
pfrechetCopula(0.5)
pfrechetCopula(0.25, 0.75)
pfrechetCopula(runif(5))
## grid2d -
grid2d()
pfrechetCopula(grid2d())
Run the code above in your browser using DataLab