Print contents of the SDTree.
# S3 method for class 'SDTree'
print(x, ...)
No return value, called for side effects
set.seed(1)
n <- 10
X <- matrix(rnorm(n * 5), nrow = n)
y <- sign(X[, 1]) * 3 + rnorm(n)
model <- SDTree(x = X, y = y, Q_type = 'no_deconfounding', cp = 0.5)
print(model)
#> levelName value s j label decision n_samples
#> 1 1 0.7434569 0.2565755 1 X1 <= 0.26 10
#> 2 ¦--1 -1.4054911 NA NA -1.4 yes 5
#> 3 °--2 2.8924048 NA NA 2.9 no 5