SDModels2.0.2 package

Spectrally Deconfounded Models

cvSDTree

Cross-validation for the SDTree

f_four

Function of x on a fourier basis

get_cp_seq.SDForest

Get the sequence of complexity parameters of an SDForest

get_cp_seq.SDTree

Get the sequence of complexity parameters of an SDTree

get_Q

Estimation of spectral transformation

get_W

Estimation of anchor transformation

mergeForest

Merge two forests

partDependence

Partial dependence

plot.partDependence

Plot partial dependence

plot.paths

Visualize the paths of an SDTree or SDForest

plot.SDForest

Plot performance of SDForest against number of trees

plot.SDTree

Plot SDTree

plotOOB

Visualize the out-of-bag performance of an SDForest

predict_individual_fj

Predictions of individual component functions for SDAM

predict.SDAM

Predictions for SDAM

predict.SDForest

Predictions for the SDForest

predict.SDTree

Predictions for the SDTree

predictOOB

Out-of-bag predictions for the SDForest

print.partDependence

Print partDependence

print.SDAM

Print SDAM

print.SDForest

Print SDForest

prune.SDForest

Prune an SDForest

prune.SDTree

Prune an SDTree

regPath.SDForest

Calculate the regularization path of an SDForest

regPath.SDTree

Calculate the regularization path of an SDTree

SDAM

Spectrally Deconfounded Additive Models

SDForest

Spectrally Deconfounded Random Forests

SDTree

Spectrally Deconfounded Tree

simulate_data_nonlinear

Simulate data with linear confounding and non-linear causal effect

simulate_data_step

Simulate data with linear confounding and causal effect following a st...

stabilitySelection.SDForest

Calculate the stability selection of an SDForest

varImp.SDAM

Extract Variable importance for SDAM

varImp.SDForest

Extract variable importance of an SDForest

varImp.SDTree

Extract variable importance of an SDTree

Screen for and analyze non-linear sparse direct effects in the presence of unobserved confounding using the spectral deconfounding techniques (Ćevid, Bühlmann, and Meinshausen (2020)<jmlr.org/papers/v21/19-545.html>, Guo, Ćevid, and Bühlmann (2022) <doi:10.1214/21-AOS2152>). These methods have been shown to be a good estimate for the true direct effect if we observe many covariates, e.g., high-dimensional settings, and we have fairly dense confounding. Even if the assumptions are violated, it seems like there is not much to lose, and the deconfounded models will, in general, estimate a function closer to the true one than classical least squares optimization. 'SDModels' provides functions SDAM() for Spectrally Deconfounded Additive Models (Scheidegger, Guo, and Bühlmann (2025) <doi:10.1145/3711116>) and SDForest() for Spectrally Deconfounded Random Forests (Ulmer, Scheidegger, and Bühlmann (2025) <doi:10.1080/10618600.2025.2569602>).

  • Maintainer: Markus Ulmer
  • License: GPL-3
  • Last published: 2025-12-14