← Về thư mục
skills/bioskills/bio-clinical-biostatistics-survival-analysis/scripts/survival_clinical.py
- adtte_to_lifelines · function · L26-L30 — def adtte_to_lifelines(adtte_df)
- cox_with_ph_check · function · L36-L50 — def cox_with_ph_check(df, duration_col='time', event_col='event', covariates='treatment + age + ECOG_baseline')
- rmst_difference · function · L56-L87 — def rmst_difference(df, arm_col='arm', duration_col='time', event_col='event', tau=36)
- competing_risks_analysis · function · L93-L130 — def competing_risks_analysis(df, duration_col='time', event_status_col='event_status', cause_of_interest=1, competing_cause=2, covariates='treatment + age')
- weighted_logrank_for_npa · function · L136-L168 — def weighted_logrank_for_npa(df, time_col='time', event_col='event', group_col='arm', weightings='peto')
- simulate_trial · function · L174-L196 — def simulate_trial(n_per_arm=200, hr=0.65, lambda_control=0.04, follow_up=48, seed=42)