
Step: Cox Proportional Hazards Model
step_cox.RdPerform survival analysis by fitting a Cox proportional hazards model
using glystats::gly_cox() for each variable.
This step identifies variables associated with survival outcomes.
This step depends on the on parameter (default: exp).
When
on = "exp", requiresexp(usually afterstep_preprocess()).When
on = "sig_exp", requiressig_expfrom one ofstep_dea_limma(),step_dea_ttest(),step_dea_wilcox(),step_dea_anova(), orstep_dea_kruskal().When
on = "trait_exp", requirestrait_expfromstep_derive_traits().When
on = "sig_trait_exp", requiressig_trait_expfrom DEA on traits.When
on = "dynamic_motif_exp", requiresdynamic_motif_expfromstep_quantify_dynamic_motifs().When
on = "sig_dynamic_motif_exp", requiressig_dynamic_motif_expfrom DEA on motifs.When
on = "branch_motif_exp", requiresbranch_motif_expfromstep_quantify_branch_motifs().When
on = "sig_branch_motif_exp", requiressig_branch_motif_expfrom DEA on motifs.
Arguments
- on
Name of the experiment to run Cox regression on. Can be "exp", "sig_exp", "trait_exp", "sig_trait_exp", "dynamic_motif_exp", "sig_dynamic_motif_exp", "branch_motif_exp", "sig_branch_motif_exp".
- time_col
Column name in sample information containing survival time. Default is "time".
- event_col
Column name in sample information containing event indicator (1 for event, 0 for censoring). Default is "event".
- p_adj_method
Method for adjusting p-values. See
p.adjust.methods. Default is "BH". If NULL, no adjustment is performed.- ...
Additional arguments passed to
glystats::gly_cox().
Details
Data required:
exp(ifon = "exp"): The experiment to run Cox regression ontrait_exp(ifon = "trait_exp"): The trait experiment to run Cox regression ondynamic_motif_exp(ifon = "dynamic_motif_exp"): The dynamic motif experiment to run Cox regression onbranch_motif_exp(ifon = "branch_motif_exp"): The branch motif experiment to run Cox regression on
The experiment must contain survival data with time_col and event_col columns
in the sample information.
Tables generated (with suffixes):
cox: A table containing Cox regression results with columns:variable: Variable namecoefficient: Regression coefficient (log hazard ratio)std.error: Standard error of the coefficientstatistic: Wald test statisticp_val: Raw p-value from Wald testhr: Hazard ratio (exp(coefficient))p_adj: Adjusted p-value (if p_adj_method is not NULL)
Examples
step_cox()
#> <step "step_cox()"> Cox proportional hazards model
step_cox(time_col = "survival_time", event_col = "death")
#> <step "step_cox(time_col = \"survival_time\", event_col = \"death\")"> Cox
#> proportional hazards model
step_cox(on = "sig_exp", p_adj_method = "bonferroni")
#> <step "step_cox(on = \"sig_exp\", p_adj_method = \"bonferroni\")"> Cox
#> proportional hazards model of significant variables