# Load sample data
data(sample_data)
# Quick demonstration with 2 conditions (< 5 seconds)
# This explores 2^2 = 4 threshold combinations
sweep_list <- list(
X1 = 6:7, # Reduced from 6:8 to 6:7
X2 = 6:7 # Reduced from 6:8 to 6:7
)
# Run multiple condition threshold sweep with reduced parameters (standard)
result_quick <- ctSweepM(
dat = sample_data,
outcome = "Y",
conditions = c("X1", "X2"), # Reduced from 3 to 2 conditions
sweep_list = sweep_list,
thrY = 7
)
head(result_quick$summary)
# Run with negated outcome (~Y)
result_neg <- ctSweepM(
dat = sample_data,
outcome = "~Y",
conditions = c("X1", "X2"),
sweep_list = sweep_list,
thrY = 7
)
head(result_neg$summary)
# \donttest{
# Full multi-condition analysis with 3 conditions
# This explores 3^3 = 27 threshold combinations (takes ~5-8 seconds)
sweep_list_full <- list(
X1 = 6:8,
X2 = 6:8,
X3 = 6:8
)
result_full <- ctSweepM(
dat = sample_data,
outcome = "Y",
conditions = c("X1", "X2", "X3"),
sweep_list = sweep_list_full,
thrY = 7
)
# Visualize threshold-dependent solution paths
head(result_full$summary)
# }
Run the code above in your browser using DataLab