fit_all_methods: Fit all borrowing methods on a single dataset

View source: R/fit_dispatcher.R

fit_all_methodsR Documentation

Fit all borrowing methods on a single dataset

Description

Convenience wrapper that fits internal-only, naive pooled, Li adaptive lasso, and all four likelihood-informed penalties (P1-P4) on a single hybrid-control dataset and returns a tidy data frame of results. Both model-based and sandwich standard errors are reported.

Usage

fit_all_methods(
  dat,
  lambda_li = 0.2,
  gamma_li = 1,
  lambda_p1 = 0.2,
  lambda_p2 = 0.2,
  gate_c = 1.64,
  gate_tau = 0.25,
  lambda_p3 = 0.2,
  gamma_mcp = 3,
  lambda_p4 = 0.2,
  delta_bounds = DEFAULT_DELTA_BOUNDS,
  robust = FALSE,
  eps = SMOOTH_EPS,
  n_grid_opt = DEFAULT_N_GRID_OPT,
  rho_mcp = DEFAULT_RHO_MCP
)

Arguments

dat

A data frame conforming to the column conventions of simulate_hybrid_cox.

lambda_li, gamma_li

Tuning for the adaptive lasso method.

lambda_p1

Tuning for the precision-weighted L1 (P1).

lambda_p2, gate_c, gate_tau

Tuning for the smoothed integrated-gate L1 (P2).

lambda_p3, gamma_mcp

Tuning for the information-adaptive MCP (P3).

lambda_p4

Tuning for the likelihood-ratio-weighted L1 (P4).

delta_bounds

Optimization interval for delta.

robust

Use robust (Lin-Wei) Cox standard errors.

eps

Smoothing parameter for |\delta|_\varepsilon.

n_grid_opt

Number of grid points for the coarse search (used by P2 and P3).

rho_mcp

MCP transition fraction in (0, 1), default 0.1.

Value

A data frame with one row per method, columns method, theta_hat, se_theta (model-based), se_sand (sandwich), z, z_sand, delta_hat, pen_curv, pen_curv_raw.

Examples

set.seed(1)
sim <- simulate_hybrid_cox(nI1 = 100, nI0 = 100, nE = 200,
                           theta0 = log(0.8), delta0 = 0)
fit_all_methods(sim$data)

fdb documentation built on Oct. 4, 2026, 5:07 p.m.