我正在使用时变协变量运行生存 cox 回归:
from lifelines import CoxTimeVaryingFitter
ctv = CoxTimeVaryingFitter(penalizer=0.1)
ctv.fit(train_long, id_col="ID", event_col="daysInDeliquency", start_col="start", stop_col="stop", show_progress=True, formula="REER+inflation")
我想看看我的变量对生存的部分影响,例如变量 REER
,我正在运行代码
ctv.plot_covariate_groups(covariates='REER'
:)但这给了我错误:
NameError: name 'self' is not define