Run g-BKMR analysis
gbkmr_run(
data,
outcome = "Y",
outcome_type = c("continuous", "binary"),
time_points,
currind = 1,
sel = NULL,
n = NULL,
K = 1000,
iter = 15000,
n_knots = 50,
engine = c("auto", "bkmr", "fastbkmr"),
n_subset = NULL,
n_cores = NULL,
a_probs = c(0.25, 0.75),
a_vals = NULL,
astar_vals = NULL,
verbose = TRUE
)Data frame in g-BKMR format (see prepare_gbkmr_data).
Character. Outcome variable name (default: "Y").
Character. "continuous" or "binary".
Integer. Number of time points.
Integer. Random seed.
Numeric vector. Post-burn-in MCMC indices (auto-calculated if NULL).
Integer. Sample size (default: min(500, nrow(data))).
Integer. Monte Carlo samples.
Integer. Total MCMC iterations.
Integer. Knots for kernel approximation.
Character. "auto" (default), "bkmr", or "fastbkmr". When "auto", the engine is selected based on sample size: standard BKMR for n <= 2000, fast BKMR for n > 2000 (if fbkmr is installed).
Integer or NULL. Number of subsets for fastBKMR. If NULL (default), auto-calculated as max(5, floor(n / 1000)).
Integer or NULL. Number of parallel cores for fastBKMR. If NULL (default), auto-calculated as min(n_subset, available cores, 10).
Numeric vector of length 2. Quantile probabilities for intervention levels (default: c(0.25, 0.75)).
Named numeric vector or NULL. Custom low-exposure values.
Named numeric vector or NULL. Custom high-exposure values.
Logical. Print progress.
Object of class "gbkmr_results".