Learn R Programming

packDAMipd (version 1.1.0)

plot_survival_cox_covariates: Plotting survival function for all covariates calculated from cox regression results and returned coefficients

Description

Plotting survival function for all covariates calculated from cox regression results and returned coefficients

Usage

plot_survival_cox_covariates(
  coxfit,
  dataset,
  param_to_be_estimated,
  covariates,
  indep_var
)

Value

plot and the survival function values

Arguments

coxfit

cox regression fit result

dataset

param describing the methods

param_to_be_estimated

parameter to be estimated

covariates

covariates

indep_var

independent variable

Examples

Run this code
# \donttest{
 data_for_survival <- survival::lung
 surv_estimated <- use_coxph_survival("status", data_for_survival, "sex",
 covariates = c("ph.ecog"), "time")
 plot_survival_cox_covariates(surv_estimated$fit,data_for_survival,
 "status", covariates = c("ph.ecog"), "sex")
 # }

Run the code above in your browser using DataLab