BaşlayınÜcretsiz Başlayın

Test the PH assumption automatically

For other continuous variables in prison, you will test the proportional hazards assumption using the .check_assumptions() method.

cph is the fitted Cox PH model using all columns, and it has been loaded.

The CoxPHFitter class has been imported. The pandas and numpy libraries are imported as pd and np, respectively.

Bu egzersiz

Survival Analysis in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Use .check_assumptions() at significance level 0.1 to check the proportional hazards assumption for prison.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Check PH assumption
print(cph.____(training_df=____, p_value_threshold=____))
Kodu Düzenle ve Çalıştır