simpA.kendallReg: Test of the simplifying assumption using the constancy of...

View source: R/simpA.kendallReg.R

simpA.kendallRegR Documentation

Test of the simplifying assumption using the constancy of conditional Kendall's tau

Description

This function computes Kendall's regression, a regression-like model for conditional Kendall's tau. More precisely, it fits the model

\Lambda(\tau_{X_1, X_2 | Z = z}) = \sum_{j=1}^{p'} \beta_j \psi_j(z),

where \tau_{X_1, X_2 | Z = z} is the conditional Kendall's tau between X_1 and X_2 conditionally to Z=z, \Lambda is a function from ]-1, 1] to R, (\beta_1, \dots, \beta_p) are unknown coefficients to be estimated and \psi_1, \dots, \psi_{p'}) are a dictionary of functions. Then, this function tests the assumption

\beta_2 = \beta_3 = ... = \beta_{p'} = 0,

where the coefficient corresponding to the intercept is removed.

Usage

simpA.kendallReg(
  X1,
  X2,
  Z,
  vectorZToEstimate = NULL,
  listPhi = list(z = function(z) {
     return(z)
 }),
  typeEstCKT = 4,
  h_kernel,
  Lambda = function(x) {
     return(x)
 },
  Lambda_deriv = function(x) {
     return(1)
 },
  Lambda_inv = function(x) {
     return(x)
 },
  lambda = NULL,
  h_lambda = h_kernel,
  Kfolds_lambda = 5,
  l_norm = 1
)

## S3 method for class 'simpA_kendallReg_test'
coef(object, ...)

## S3 method for class 'simpA_kendallReg_test'
vcov(object, ...)

## S3 method for class 'simpA_kendallReg_test'
print(x, ...)

## S3 method for class 'simpA_kendallReg_test'
plot(x, ylim = c(-1.5, 1.5), ...)

Arguments

X1

vector of observations of the first conditioned variable

X2

vector of observations of the second conditioned variable

Z

vector of observations of the conditioning variable

vectorZToEstimate

vector containing the points Z'_i to be used at which the conditional Kendall's tau should be estimated.

listPhi

the list of transformations phi to be used.

typeEstCKT

the type of estimation of the kernel-based estimation of conditional Kendall's tau.

h_kernel

the bandwidth used for the kernel-based estimations.

Lambda

the function to be applied on conditional Kendall's tau. By default, the identity function is used.

Lambda_deriv

the derivative of the function Lambda.

Lambda_inv

the inverse function of Lambda.

lambda

the penalization parameter used for Kendall's regression. By default, cross-validation is used to find the best value of lambda if length(listPhi) > 1. Otherwise lambda = 0 is used.

h_lambda

bandwidth used for the smooth cross-validation in order to get a value for lambda.

Kfolds_lambda

the number of subsets used for the cross-validation in order to get a value for lambda.

l_norm

type of norm used for selection of the optimal lambda by cross-validation. l_norm=1 corresponds to the sum of absolute values of differences between predicted and estimated conditional Kendall's tau while l_norm=2 corresponds to the sum of squares of differences.

object, x

an S3 object of class simpA_kendallReg_test.

...

other arguments, unused

ylim

graphical parameter, see plot

Value

simpA.kendallReg returns an S3 object of class simpA_kendallReg_test, containing

  • statWn: the value of the test statistic.

  • p_val: the p-value of the test.

plot.simpA_kendallReg_test returns (invisibly) a matrix with columns z, est_CKT_NP, asympt_se_np, est_CKT_NP_q025, est_CKT_NP_q975, est_CKT_reg, asympt_se_reg, est_CKT_reg_q025, est_CKT_reg_q975. The first column correspond to the grid of values of z. The next 4 columns are the NP (kernel-based) estimator of conditional Kendall's tau, with its standard error, and lower/upper confidence bands. The last 4 columns are the equivalents for the estimator based on Kendall's regression.

plot.simpA_kendallReg_test plots the kernel-based estimator and its confidence band (in red), and the estimator based on Kendall's regression and its confidence band (in blue).

Usually the confidence band for Kendall's regression is much tighter than the pure non-parametric counterpart. This is because the parametric model is sparser and the corresponding estimator converges faster (even without penalization).

print.simpA_kendallReg_test has no return values and is only called for its side effects.

Function coef.simpA_kendallReg_test returns the matrix of coefficients with standard errors, z values and p-values.

Function vcov.simpA_kendallReg_test returns the (estimated) variance-covariance matrix of the estimated coefficients.

References

Derumigny, A., & Fermanian, J. D. (2020). On Kendall’s regression. Journal of Multivariate Analysis, 178, 104610. (page 7) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.jmva.2020.104610")}

See Also

The function to fit Kendall's regression: CKT.kendallReg.fit.

Other tests of the simplifying assumption:

  • simpA.NP in a nonparametric setting

  • simpA.param in a (semi)parametric setting, where the conditional copula belongs to a parametric family, but the conditional margins are estimated arbitrarily through kernel smoothing

  • the counterparts of these tests in the discrete conditioning setting: bCond.simpA.CKT (test based on conditional Kendall's tau) bCond.simpA.param (test assuming a parametric form for the conditional copula)

Examples



# We simulate from a non-simplified conditional copula
set.seed(1)
N = 300
Z = runif(n = N, min = 0, max = 1)
conditionalTau = -0.9 + 1.8 * Z
simCopula = VineCopula::BiCopSim(N=N , family = 1,
    par = VineCopula::BiCopTau2Par(1 , conditionalTau ))
X1 = qnorm(simCopula[,1])
X2 = qnorm(simCopula[,2])

result = simpA.kendallReg(
  X1, X2, Z, h_kernel = 0.03,
  listPhi = list(z = function(z){return(z)} ) )
print(result)
plot(result)
# Obtain matrix of coefficients, std err, z values and p values
coef(result)
# Obtain variance-covariance matrix of the coefficients
vcov(result)

result_morePhi = simpA.kendallReg(
   X1, X2, Z, h_kernel = 0.03,
   listPhi = list(
     z = function(z){return(z)},
     cos10z = function(z){return(cos(10 * z))},
     sin10z = function(z){return(sin(10 * z))},
     `1(z <= 0.4)` = function(z){return(as.numeric(z <= 0.4))},
     `1(z <= 0.6)` = function(z){return(as.numeric(z <= 0.6))}) )
print(result_morePhi)
plot(result_morePhi)

# We simulate from a simplified conditional copula
set.seed(1)
N = 300
Z = runif(n = N, min = 0, max = 1)
conditionalTau = -0.3
simCopula = VineCopula::BiCopSim(N=N , family = 1,
    par = VineCopula::BiCopTau2Par(1 , conditionalTau ))
X1 = qnorm(simCopula[,1])
X2 = qnorm(simCopula[,2])

result = simpA.kendallReg(
   X1, X2, Z, h_kernel = 0.03,
   listPhi = list(
     z = function(z){return(z)},
     cos10z = function(z){return(cos(10 * z))},
     sin10z = function(z){return(sin(10 * z))},
     `1(z <= 0.4)` = function(z){return(as.numeric(z <= 0.4))},
     `1(z <= 0.6)` = function(z){return(as.numeric(z <= 0.6))}) )
print(result)
plot(result)



CondCopulas documentation built on Sept. 11, 2024, 9:10 p.m.