BiCopEstMMD {MMDCopula} | R Documentation |
Estimation of parametric bivariate copulas using stochastic gradient descent on the MMD criteria
Description
This function uses computes the MMD-estimator of a bivariate copula family.
This computation is done through a stochastic gradient algorithm,
that is itself computed by the function BiCopGradMMD()
.
The main arguments are the two vectors of observations, and the copula family.
The bidimensional copula families are indexed in the same way as
in VineCopula::BiCop()
(which computes the MLE estimator).
Usage
BiCopEstMMD(
u1,
u2,
family,
tau = NULL,
par = NULL,
par2 = NULL,
kernel = "gaussian",
gamma = "default",
alpha = 1,
niter = 100,
C_eta = 1,
epsilon = 1e-04,
method = "QMCV",
quasiRNG = "sobol",
ndrawings = 10
)
Arguments
u1 |
vector of observations of the first coordinate, in |
u2 |
vector of observations of the second coordinate, in |
family |
the chosen family of copulas
(see the documentation of the class |
tau |
the copula family can be parametrized by the parameter |
par |
if different from |
par2 |
initial value for the second parameter, if any. (Works only for Student copula). |
kernel |
the kernel used in the MMD distance:
it can be a function taking in parameter
Each of these names can receive the suffix |
gamma |
parameter |
alpha |
parameter |
niter |
the stochastic gradient algorithm is composed of two phases:
a first "burn-in" phase and a second "averaging" phase.
If |
C_eta |
a multiplicative constant controlling for the size of the gradient descent step.
The step size is then computed as |
epsilon |
the differential of |
method |
the method of computing the stochastic gradient:
|
quasiRNG |
a function giving the quasi-random points in |
ndrawings |
number of replicas of the stochastic estimate of the gradient drawn at each step. The gradient is computed using the average of these replicas. |
Value
an object of class VineCopula::BiCop()
containing the estimated copula.
References
Alquier, P., Chérief-Abdellatif, B.-E., Derumigny, A., and Fermanian, J.D. (2022). Estimation of copulas via Maximum Mean Discrepancy. Journal of the American Statistical Association, doi:10.1080/01621459.2021.2024836.
See Also
VineCopula::BiCopEst()
for other methods of estimation
such as Maximum Likelihood Estimation or Inversion of Kendall's tau.
BiCopGradMMD()
for the computation of the stochastic gradient.
BiCopEst.MO
for the estimation of Marshall-Olkin copulas by MMD.
Examples
# Estimation of a bivariate Gaussian copula with correlation 0.5.
dataSampled = VineCopula::BiCopSim(N = 500, family = 1, par = 0.5)
estimator = BiCopEstMMD(u1 = dataSampled[,1], u2 = dataSampled[,2], family = 1, niter = 10)
estimator$par
# Estimation of a bivariate Student copula with correlation 0.5 and 5 degrees of freedom
dataSampled = VineCopula::BiCopSim(N = 1000, family = 2, par = 0.5, par2 = 5)
estimator = BiCopEstMMD(u1 = dataSampled[,1], u2 = dataSampled[,2], family = 2)
estimator$par
estimator$par2
# Comparison with maximum likelihood estimation with and without outliers
dataSampled = VineCopula::BiCopSim(N = 500, family = 1, par = 0.5)
estimatorMMD = BiCopEstMMD(u1 = dataSampled[,1], u2 = dataSampled[,2], family = 1)
estimatorMMD$par
estimatorMLE = VineCopula::BiCopEst(u1 = dataSampled[,1], u2 = dataSampled[,2],
family = 1, method = "mle")
estimatorMLE$par
dataSampled[1:10,1] = 0.999
dataSampled[1:10,2] = 0.001
estimatorMMD = BiCopEstMMD(u1 = dataSampled[,1], u2 = dataSampled[,2], family = 1)
estimatorMMD$par
estimatorMLE = VineCopula::BiCopEst(u1 = dataSampled[,1], u2 = dataSampled[,2],
family = 1, method = "mle")
estimatorMLE$par
# Estimation of a bivariate Gaussian copula with real data
data("daxreturns", package = "VineCopula")
BiCopEstMMD(u1 = daxreturns[,1], u2 = daxreturns[,2], family = 1)
estimator$par