estimateCondQuantiles {CondCopulas} | R Documentation |
Compute kernel-based conditional quantiles
Description
This function is supposed to be used with computeKernelMatrix
.
Assume that we observe a sample .
We want to estimate the conditional quantiles of
given
at point
using the following kernel-based estimator
where
for every in
probsX1
and every in
newX3
.
The matrixK3
should be a matrix of the values
such as the one produced by
computeKernelMatrix(observedX3, newX3, kernel, h)
.
Usage
estimateCondQuantiles(observedX1, probsX1, matrixK3)
Arguments
observedX1 |
a sample of observations of X1 of size n |
probsX1 |
a sample of probabilities at which we want to compute the quantiles for the variable X1, of size p1 |
matrixK3 |
a matrix of kernel values of dimension (p2 , n)
|
Value
A matrix of dimensions (p1,p2)
whose (i,j) entry is
with
=
probsX1[i]
and =
newX3[j]
,
where newX3[j]
is the vector that was used to construct matrixK3
.
Examples
Y = MASS::mvrnorm(n = 100, mu = c(0,0), Sigma = cbind(c(1, 0.9), c(0.9, 1)))
matrixK = computeKernelMatrix(observedX = Y[,2] , newX = c(0, 1, 2.5),
kernel = "Gaussian", h = 0.8)
matrixnp = estimateCondQuantiles(observedX1 = Y[,2],
probsX1 = c(0.3, 0.5) , matrixK3 = matrixK)
matrixnp