Learn R Programming

copula (version 0.999-19)

getAcop: Get "acopula" Family Object by Name

Description

Get one of our "acopula" family objects (see acopula-families by name.

Named strings for “translation” between different names and forms of Archimedean copulas.

Usage

getAcop (family, check = TRUE)
getAname(family, objName = FALSE)

.ac.shortNames .ac.longNames .ac.objNames .ac.classNames

Arguments

family

either a character string, the short or longer form of the Archimedean family name (for example, "Clayton" or simply "C"; see the acopula-families documentation), or an '>acopula family object, or an object inheriting from class '>archmCopula.

check

logical indicating whether the class of the return value should be checked to be "'>acopula".

objName

logical indicating that the name of the R object should be returned, instead of the family name, e.g., "copClayton" instead of "Clayton".

Value

getAcop() returns an "'>acopula" family object, typically one of one of our predefined ones.

getAname() returns a character string, the name of an "'>acopula" family object.

.as.longnames etc are named string constants, useful in programming for all our (five) standard Archimedean families.

See Also

Our predefined acopula-families; the class definition "'>acopula".

Examples

Run this code
# NOT RUN {
getAcop("Gumbel")

## different ways of getting the same "acopula" family object:
stopifnot(## Joe (three ways):
          identical(getAcop("J"), getAcop("Joe")),
          identical(getAcop("J"), copJoe),
          ## Frank (yet another two different ways):
          identical(getAcop(frankCopula()), copFrank),
          identical(getAcop("frankCopula"), copFrank))

stopifnot(
  identical(getAname(claytonCopula()), getAname("C")),
  identical(getAname(copClayton), "Clayton"), identical(getAname("J"), "Joe"),
  identical(getAname(amhCopula(), TRUE), "copAMH"),
  identical(getAname(joeCopula(), TRUE), "copJoe")
)

.ac.shortNames
.ac.longNames
.ac.objNames
.ac.classNames
# }

Run the code above in your browser using DataLab