Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: VaR
See also: VaRfitcopula VaRsimcopula VaRest

Quantlet: VaRcopula
Description: calculates the copula function, its derivatives and the inverse (in two dimensions).

Reference(s):

Usage: F = VaRcopula(uv,theta,mode,cop)
Input:
uv n x 2 matrix of coordinates
theta scalar, the parameter of the function
mode integer, mode=-1: computes (dG_theta,u/du)(v)^(-1) mode=0: computes the copula cop_theta(u,v) mode=1,2,3: computes the first numeric derivative of copula cop for the 1st (2nd,3rd) parameter mode=4,5,6: computes the second numeric derivative of copula cop for the 1st (2nd,3rd) parameter mode=7: returns initial theta for fitting the copula cop by newton in F mode=8: returns minimum theta for copula cop mode=9: returns maximum theta for copula cop mode>9: computes derivative with respect to more than one variable, e.g., mode=xyz where x=1, y=2, z=3 => mode=123 computes d^3Gumbel/(dparam1*dparam2*dparam3)
cop scalar, integer between 1 and 22, selects the copula. Numbering conforms to the last digit in the table on p.94 from R. B. Nelsen, An Introduction to Copulas, cop=1 - Pareto-Clayton, cop=4 - Gumbel-Hougaard, cop=5 - Frank.
Output:
F scalar for modes 7,8,9, (n x 1) vector otherwise; its contents depends on the input parameter mode

Note:

Example:
library("VaR")
theta=3
uv0=#(0,0)
huv=#(0.05,0.05)
nuv=#(21,21)
guv=grid(uv0,huv,nuv)
cuv=VaRcopula(guv,theta,0,4)
m  = matrix(3)* 5
form = "%.1f" | "%.1f" | "%.1f"
gc = grcube(guv~cuv,m,form)
gs = grsurface(guv~cuv)
axes=graxes3d(guv~cuv,"u"|"v"|"C(u,v)")
di = createdisplay(1,1)
axesoff()
show(di,1,1,gs,gc.box,gc.x,gc.y,gc.z,gc.c,axes)

Result:
calculates and plots the Gumbel-Hougaard copula



Author: J. Rank, T. Siegl, Z. Hlavka, 20010725
(C) MD*TECH Method and Data Technologies, 05.02.2006