
Fast Weibull Regression with General Censoring (C++ Backend)
Source:R/helper_glm_fit.R, R/RcppExports.R
fast_weibull_regression_general_cpp.RdWeibull Accelerated Failure Time model fitting extended to
left-, right-, and interval-censored responses (TODO-3 in
interval_censored_survival_response.md). Zero-regression by
construction: exact/right-censored-only input uses the same likelihood
contributions as the corresponding survival::Surv() response.
Usage
fast_weibull_regression_general_cpp(
X,
y,
y_L,
y_R,
warm_start_params = NULL,
smart_cold_start = TRUE,
estimate_only = FALSE,
maxit = 100L,
tol = 1e-08,
fixed_idx = NULL,
fixed_values = NULL,
optimization_alg = "lbfgs",
warm_start_fisher_info = NULL
)Arguments
- X
A numeric matrix of predictors.
- y
Exact survival times,
NAfor censored subjects.- y_L
Censored-interval lower bounds,
NAfor exact subjects;0for left-censored.- y_R
Censored-interval upper bounds,
NAfor exact subjects;Inffor right-censored.- warm_start_params
Optional starting values for coefficients.
- smart_cold_start
Logical. If TRUE, use an initial OLS-based guess.
- estimate_only
Logical. If TRUE, do not compute variance-covariance.
- maxit
Maximum number of iterations.
- tol
Convergence tolerance.
- fixed_idx
Optional indices of fixed parameters.
- fixed_values
Optional values for fixed parameters.
- optimization_alg
Optimization algorithm.
- warm_start_fisher_info
Optional initial Fisher Information matrix.
Value
A list containing the following components:
- coefficients
A numeric vector of the estimated Weibull regression coefficients, including the intercept.
- log_sigma
The logarithm of the scale parameter from the Weibull distribution.
- vcov
The variance-covariance matrix of the estimated coefficients.
- neg_ll
The negative log-likelihood at the final iteration.
- converged
A logical value indicating whether the algorithm converged.
A list containing coefficients, log_sigma, and convergence status.