get_event_variable: Extract event variable from survival model

View source: R/m2dt_utils.R

get_event_variableR Documentation

Extract event variable from survival model

Description

Parses the Surv() expression in survival model formulas to extract the event/status variable name. Works with coxph, clogit, and coxme models.

Usage

get_event_variable(model, model_class)

Arguments

model

Fitted survival model object.

model_class

Character string of the model class.

Value

Character string naming the event variable, or NULL if not found.


summata documentation built on May 7, 2026, 5:07 p.m.