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

Log-rank test

After comparing the median survival times of patients with and without pericardial effusion, you also inspected their survival curves visually. To your surprise, the curves actually seem quite similar to each other. Before you finalize your conclusion, it's important to scientifically test this hypothesis. You will use the log-rank test and inspect the p-value to make a decision.

The pandas package is loaded as pd. DataFrames for patients with and without pericardial effusion are loaded and stored as has_pericardial_effusion and none_pericardial_effusion, respectively.

Bu egzersiz

Survival Analysis in Python

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Import logrank_test
from ____ import ____

# Run log-rank test to compare patients with and without pericardial effusion
patient_results = logrank_test(____)
Kodu Düzenle ve Çalıştır