Q of class matrix, the spectral transformation matrix.
Arguments
X
Numerical covariates of class matrix.
type
Type of deconfounding, one of 'trim', 'pca', 'no_deconfounding'.
'trim' corresponds to the Trim transform Cevid2020SpectralModelsSDModels
as implemented in the Doubly debiased lasso Guo2022DoublyConfoundingSDModels,
'pca' to the PCA transformationPaul2008PreconditioningProblemsSDModels
and 'no_deconfounding' to the Identity.
trim_quantile
Quantile for Trim transform, only needed for trim.
q_hat
Assumed confounding dimension, only needed for pca.
gpu
If TRUE, the calculations are performed on the GPU.
If it is properly set up.
scaling
Whether X should be scaled before calculating the spectral transformation.