Reputation: 21
I am running survival cox regression with time-varying covariates :
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")
I want to see the partial effect of my variable on survival, for example, variable REER
and I am running the code:
ctv.plot_covariate_groups(covariates='REER'
)
But this give me error:
NameError: name 'self' is not define
Upvotes: 1
Views: 271
Reputation: 11
Referring to this lifelines documentation 'plot_covariate_groups' is no longer used and been renamed to 'plot_partial_effects_on_outcome'. Try to use it. It worked for me.
Upvotes: 1