1

我正在使用时变协变量运行生存 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
4

1 回答 1

1

参考此生命线文档 “plot_covariate_groups”不再使用,并已重命名为“plot_partial_effects_on_outcome”。尝试使用它。它对我有用。

于 2021-10-13T21:56:47.523 回答