Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Survival Analysis in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Fit custom model
____
Code bewerken en uitvoeren