estimateNPCondCopula {CondCopulas} | R Documentation |
Compute a kernel-based estimator of the conditional copula
Description
Assuming that we observe a sample (X_{i,1}, X_{i,2}, X_{i,3}), i=1, \dots, n
,
this function returns a array
\hat C_{1,2|3}(u_1, u_2 | X_3 = x_3)
for each choice of (u_1, u_2, x_3).
Usage
estimateNPCondCopula(
observedX1,
observedX2,
observedX3,
U1_,
U2_,
newX3,
kernel,
h
)
Arguments
observedX1 |
a vector of observations of size n |
observedX2 |
a vector of observations of size n |
observedX3 |
a vector of observations of size n |
U1_ |
a vector of numbers in [0, 1] |
U2_ |
a vector of numbers in [0, 1] |
newX3 |
a vector of new values for the conditioning variable X3 |
kernel |
a character string describing the kernel to be used.
Possible choices are |
h |
the bandwidth to use in the estimation. |
Value
An array of dimension (length(U1_, U2_, newX3))
whose element in position (i, j, k) is
\hat C_{1,2|3}(u_1, u_2 | X_3 = x_3)
where u_1
= U1_[i], u_2
= U2_[j] and x_3
= newX3[k]
References
Derumigny, A., & Fermanian, J. D. (2017). About tests of the “simplifying” assumption for conditional copulas. Dependence Modeling, 5(1), 154-197. doi:10.1515/demo-2017-0011
See Also
estimateParCondCopula
for estimating a conditional
copula in a parametric setting ( = where the conditional copula is assumed to
belong to a parametric class).
simpA.NP
for a test that this conditional copula is
constant with respect to the value x_3
of the conditioning variable.
Examples
# We simulate from a conditional copula
N = 500
X3 = rnorm(n = N, mean = 5, sd = 2)
conditionalTau = 0.9 * pnorm(X3, mean = 5, sd = 2)
simCopula = VineCopula::BiCopSim(N=N , family = 3,
par = VineCopula::BiCopTau2Par(1 , conditionalTau ))
X1 = qnorm(simCopula[,1])
X2 = qnorm(simCopula[,2])
# We do the estimation
grid = c(0.2, 0.4, 0.6, 0.8)
arrayEst = estimateNPCondCopula(observedX1 = X1,
observedX2 = X2, observedX3 = X3,
U1_ = grid, U2_ = grid, newX3 = c(2, 5, 7),
kernel = "Gaussian", h = 0.8)
arrayEst