# Load sample data
data(sample_data)
# Set fixed thresholds for conditions
thrX <- c(X1 = 7, X2 = 7, X3 = 7)
# Run outcome threshold sweep (standard)
result <- otSweep(
dat = sample_data,
outcome = "Y",
conditions = c("X1", "X2", "X3"),
sweep_range = 6:9,
thrX = thrX
)
head(result$summary)
# Run with negated outcome (~Y)
# Analyzes conditions for Y < threshold
result_neg <- otSweep(
dat = sample_data,
outcome = "~Y",
conditions = c("X1", "X2", "X3"),
sweep_range = 6:9,
thrX = thrX
)
head(result_neg$summary)
Run the code above in your browser using DataLab