comp.resids: Wrapper function to computing residuals from a regression method
Description
This function is used for the GCM test.
Other methods can be added.
Usage
comp.resids(V, Z, regr.pars, regr.method)
Arguments
V
A (nxp)-dimensional matrix (or data frame) with n observations of p variables.
Z
A (nxp)-dimensional matrix (or data frame) with n observations of p variables.
regr.pars
Some regression methods require a list of additional options.
regr.method
A string indicating the regression method that is used. Currently implemented are
"gam", "xgboost", "kernel.ridge", "nystrom". The regression is performed only if
not both resid.XonZ and resid.YonZ are set to NULL.
Value
Vector of residuals.
References
Please cite the following paper.
Rajen D. Shah, Jonas Peters:
"The Hardness of Conditional Independence Testing and the Generalised Covariance Measure"
https://arxiv.org/abs/1804.07203