Shota
Shota

Reputation: 21

plot_covariate_groups in lifiline gives NameError: name 'self' is not defined

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

Answers (1)

Fitrie Ratnasari
Fitrie Ratnasari

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

Related Questions