Implements overall survival analysis or progression-free survival analysis, depending upon the datatypes supplied to surv_designation, and return the "survfit" object

fit_surv(omicsData)

Arguments

omicsData

A pmartR data object of any class, which has a `group_df` attribute that is usually created by the `group_designation()` function

Value

if fitted survival analysis object is returned

Examples

if (FALSE) { # \dontrun{
library(MSomicsSTAT)
library(OvarianPepdataBP)

# Basic analysis without covariates
attr(tcga_ovarian_pepdata_bp, "survDF") <- list(t_death = "survival_time",
                                                ind_death = "vital_status")
sfit <- fit_surv(tcga_ovarian_pepdata_bp)
plot(sfit)

# Add some covariate information
attr(tcga_ovarian_pepdata_bp, "survDF") <- list(
  t_death = "survival_time",
  ind_death = "vital_status",
  covariates = "g__initial_pathologic_diagnosis_method_g1"
)
sfit <- fit_surv(tcga_ovarian_pepdata_bp)
plot(sfit, col = c(1, 2))
} # }