| plot_bootstrap | R Documentation |
Displays faceted line plots comparing real (bootstrapped) vs null (permuted) coefficient trajectories across tasks for selected or all features. Each panel shows the mean and standard error of the coefficient at each task/threshold.
plot_bootstrap(x, features = NULL, batch_size = 9)
x |
Either a |
features |
A character vector of feature names to plot. If
|
batch_size |
Number of features per facet page. Default:
|
Blue lines show coefficients from models fitted on bootstrapped (resampled) data — reflecting estimation variability under real signal. Grey lines show coefficients from models fitted on permuted outcomes — reflecting the null distribution.
When the blue (real) band is clearly separated from the grey (null) band, the feature's coefficient is distinguishable from noise at that task/threshold.
A list of ggplot2 objects, one per batch/page.
bootstrap_orthoMTL
set.seed(42)
n <- 30; p <- 5; n_tasks <- 3
X <- matrix(rnorm(n * p), n, p)
colnames(X) <- paste0("V", seq_len(p))
SurvTime <- rexp(n, rate = 0.1)
Event <- rbinom(n, 1, 0.7)
thresholds <- c(4, 6, 10)
Y <- create_longitudinal_labels(SurvTime, Event, thresholds)
W <- create_indicator_matrix(Y)
K <- create_constraint_matrix(n_tasks)
boot_res <- bootstrap_orthoMTL(
X = X, Y = Y, lambda = 1e-3, step_size = 0.1,
K = K, survival = TRUE, censored.mat = W,
n_repeats = 5, n_cores = 1, verbose = FALSE
)
plots <- plot_bootstrap(boot_res)
plots[[1]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.