| prob | R Documentation |
Compute probabilities of a d-dimensional random vector U
distributed according to a given copula x to
fall in a hypercube (l,u], where l and u denote the
lower and upper corners of the hypercube, respectively.
volume(<function>, *) computes the d-dimensional integral
over the hypercube for “arbitrary” functions.
prob(x, l, u)
volume(object, ...) # generic function
## S3 method for class 'function'
volume(object, lower, upper, ...)
x |
copula of dimension |
l, u, lower, upper |
|
object |
a |
... |
additional arguments passed to the |
prob() returns a numeric in [0,1]
which is the probability P(l_i< U_i \le u_i).
volume() is the workhorse underlying prob() and its output
is the d-volume, i.e., d-dimensional integral over the given
hypercube, of the provided function.
pCopula(.).
## Construct a three-dimensional nested Joe copula with parameters
## chosen such that the Kendall's tau of the respective bivariate margins
## are 0.2 and 0.5.
theta0 <- copJoe@iTau(.2)
theta1 <- copJoe@iTau(.5)
C3 <- onacopula("J", C(theta0, 1, C(theta1, c(2,3))))
## Compute the probability of a random vector distributed according to
## this copula to fall inside the cube with lower point l and upper
## point u.
l <- c(.7,.8,.6)
u <- c(1,1,1)
prob(C3, l, u)
## ditto for a bivariate normal copula with rho = 0.8 :
Cn <- normalCopula(0.8)
(prob(Cn, c(.2,.4), c(.3,.6)) -> pr) # 0.0222...
## prob() just using volume(), internally:
pr == volume(function(z) pCopula(z, Cn), c(.2,.4), c(.3,.6))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.