CommencerCommencer gratuitement

Explore gender-LVDD interaction

You wonder if the survival risk for heart patients with LVDD (Left Ventricular Diastolic Dysfunction) is higher or lower among female patients. A good way to analyze this is with an interaction term between gender_f (1 if the subject is female, 0 otherwise) and lvdd.

You are going to fit the Weibull AFT model with gender_f*lvdd and interpret their coefficients. The DataFrame you will use is called heart_patients.

The pandas and numpy packages are loaded as pd and np, the WeibullAFTFitter class has been imported for you, and a WeibullAFTFitter instance aft has been created.

Cet exercice fait partie du cours

Survival Analysis in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Fit custom model
____
Modifier et exécuter le code