fit_one_penalized_method: Fit a single penalized borrowing method

View source: R/fit_dispatcher.R

fit_one_penalized_methodR Documentation

Fit a single penalized borrowing method

Description

Dispatches to the appropriate user-facing fit function for one of the implemented penalized borrowing methods.

Usage

fit_one_penalized_method(
  dat,
  method = c("Li", "P1", "P2", "P3", "P4"),
  lambda,
  gamma_li = 1,
  gate_c = 1.64,
  gate_tau = 0.25,
  gamma_mcp = 3,
  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.

method

One of "Li", "P1", "P2", "P3", "P4".

lambda

Penalty strength.

gamma_li

Exponent for the adaptive lasso weight (Li method).

gate_c, gate_tau

Threshold and smoothness for the P2 gate.

gamma_mcp

MCP shape parameter for P3.

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 list of estimates and inference quantities (same format as the underlying fit functions).

Examples

set.seed(1)
sim <- simulate_hybrid_cox(nI1 = 100, nI0 = 100, nE = 200,
                           theta0 = log(0.8), delta0 = 0)
fit_one_penalized_method(sim$data, method = "P1", lambda = 0.2)

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