PDF of an R-Vine Copula Model
This function calculates the probability density function of a d-dimensional R-vine copula.
RVinePDF(newdata, RVM, verbose = TRUE)
newdata |
An N x d data matrix that specifies where the density shall be evaluated. |
RVM |
An |
verbose |
In case something goes wrong, additional output will be plotted. |
The density of a d-dimensional R-vine copula with d-1 trees and corresponding edge sets E_1,...,E_{d-1} is given by
=∏_{m=1}^{d-1} ∏_{e\in E_m} c_{j(e),k(e)|D(e)}(F(u_{j(e)}|u_{D(e)}),F(u_{k(e)}|u_{D(e)})|θ_{j(e),k(e)|D(e)}),
where u=(u_{1},...,u_{d})'\in[0,1]^d. Further c_{j(e),k(e)|D(e)} denotes a bivariate copula density associated to an edge e and with parameter(s) θ_{j(e),k(e)|D(e)}. Conditional distribution functions such as F(u_{j(e)}|u_{D(e)}) are obtained recursively using the relationship
h(u|v,θ) := F(u|v) = d C_{uv_j|v_{-j}}(F(u|v_{-j}),F(v_j|v_{-j}))/d F(v_j|v_{-j}),
where C_{uv_j|v_{-j}} is a bivariate copula distribution function with parameter(s) θ and v_{-j} denotes a vector with the j-th component v_j removed. The notation of h-functions is introduced for convenience. For more details see Dissmann et al. (2013).
The function is actually just a wrapper to RVineLogLik()
.
Thomas Nagler
Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimating regular vine copulae and application to financial returns. Computational Statistics & Data Analysis, 59 (1), 52-69.
# define 5-dimensional R-vine tree structure matrix Matrix <- c(5, 2, 3, 1, 4, 0, 2, 3, 4, 1, 0, 0, 3, 4, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0, 1) Matrix <- matrix(Matrix, 5, 5) # define R-vine pair-copula family matrix family <- c(0, 1, 3, 4, 4, 0, 0, 3, 4, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0) family <- matrix(family, 5, 5) # define R-vine pair-copula parameter matrix par <- c(0, 0.2, 0.9, 1.5, 3.9, 0, 0, 1.1, 1.6, 0.9, 0, 0, 0, 1.9, 0.5, 0, 0, 0, 0, 4.8, 0, 0, 0, 0, 0) par <- matrix(par, 5, 5) # define second R-vine pair-copula parameter matrix par2 <- matrix(0, 5, 5) # define RVineMatrix object RVM <- RVineMatrix(Matrix = Matrix, family = family, par = par, par2 = par2, names = c("V1", "V2", "V3", "V4", "V5")) # compute the density at (0.1, 0.2, 0.3, 0.4, 0.5) RVinePDF(c(0.1, 0.2, 0.3, 0.4, 0.5), RVM)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.