View source: R/estimationCondCopulas.R
estimateParCondCopula | R Documentation |
The function estimateParCondCopula
computes an estimate
of the conditional parameters in a conditional parametric copula model, i.e.
C_{X_1, X_2 | X_3 = x_3} = C_{\theta(x_3)},
for some parametric family (C_\theta)
, some conditional
parameter \theta(x_3)
, and a three-dimensional random
vector (X_1, X_2, X_3)
. Remember that C_{X_1,X_2 | X_3 = x_3}
denotes the conditional copula of X_1
and X_2
given X_3 = x_3
.
The function estimateParCondCopula_ZIJ
is an auxiliary function
that is called when conditional pseudos-observations are already
available when one wants to estimate a parametric conditional copula.
estimateParCondCopula(
X1 = NULL,
X2 = NULL,
X3 = NULL,
newX3,
family,
method = "mle",
h,
observedX1 = NULL,
observedX2 = NULL,
observedX3 = NULL
)
estimateParCondCopula_ZIJ(Z1_J, Z2_J, observedX3, newX3, family, method, h)
X1 |
a vector of |
X2 |
a vector of |
X3 |
a vector of |
newX3 |
a vector of new observations of |
family |
an integer indicating the parametric family of copulas to be used, following the conventions of the VineCopula package, see e.g. VineCopula::BiCop. |
method |
the method of estimation of the conditional parameters.
Can be |
h |
bandwidth to be chosen |
observedX1 , observedX2 , observedX3 |
old parameter names for |
Z1_J |
the conditional pseudos-observations of the first variable,
i.e. |
Z2_J |
the conditional pseudos-observations of the second variable,
i.e. |
a vector of size length(newX3)
containing
the estimated conditional copula parameters for each value of newX3
.
Derumigny, A., & Fermanian, J. D. (2017). About tests of the “simplifying” assumption for conditional copulas. Dependence Modeling, 5(1), 154-197. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1515/demo-2017-0011")}
estimateNPCondCopula
for estimating a conditional
copula in a nonparametric setting ( = without parametric assumption on the
conditional copula).
simpA.param
for a test that this conditional copula is
constant with respect to the value x_3
of the conditioning variable.
# 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 = 1, par = VineCopula::BiCopTau2Par(1 , conditionalTau ))
X1 = qnorm(simCopula[,1])
X2 = qnorm(simCopula[,2])
gridnewX3 = seq(2, 8, by = 1)
conditionalTauNewX3 = 0.9 * pnorm(gridnewX3, mean = 5, sd = 2)
vecEstimatedThetas = estimateParCondCopula(
X1 = X1, X2 = X2, X3 = X3,
newX3 = gridnewX3, family = 1, h = 0.1)
# Estimated conditional parameters
vecEstimatedThetas
# True conditional parameters
VineCopula::BiCopTau2Par(1 , conditionalTauNewX3 )
# Estimated conditional Kendall's tau
VineCopula::BiCopPar2Tau(1 , vecEstimatedThetas )
# True conditional Kendall's tau
conditionalTauNewX3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.