validate_censor_formula: Validate Censoring Formula

View source: R/U01-data-validation.R

validate_censor_formulaR Documentation

Validate Censoring Formula

Description

Checks that the censoring formula is valid, uses Surv() notation, and extracts the time and event variable names.

Usage

validate_censor_formula(censor_formula)

Arguments

censor_formula

A formula object for the censoring model. Should be of the form 'Surv(time, event) ~ covariates'. Use 'Surv(time, event) ~ 0' to indicate no censoring adjustment (all censoring scores set to 1).

Value

A list containing:

formula

The validated formula object, or NULL if RHS is 0 (no censoring adjustment)

time_var

Character string of the time variable name

event_var

Character string of the event variable name


PSsurvival documentation built on Dec. 9, 2025, 9:07 a.m.