powered by
Visualize the subgroups (i.e., the student tree) from a causal distillation tree object.
plot_cdt(cdt, show_digits = 2)
A plot of the causal distillation tree.
A causal distillation tree object, typically the output of causalDT.
causalDT
Number of digits to show in the plot labels. Default is 2.
# \donttest{ n <- 200 p <- 10 X <- matrix(rnorm(n * p), nrow = n, ncol = p) Z <- rbinom(n, 1, 0.5) Y <- 2 * Z * (X[, 1] > 0) + X[, 2] + rnorm(n, 0.1) cdt <- causalDT(X, Y, Z) plot_cdt(cdt) # }
Run the code above in your browser using DataLab