library(gtsummary)
library(survival)
library(labelled)
library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4
## ✓ tibble 3.0.3 ✓ dplyr 1.0.1
## ✓ tidyr 1.1.1 ✓ stringr 1.4.0
## ✓ readr 1.3.1 ✓ forcats 0.5.0
## ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(broom)
library(ggplot2)
library(survminer)
## Loading required package: ggpubr
library(dplyr)
library(lubridate)
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
library(zoo)
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
PanCancer2000 <- read.csv( ("PancreaticCancer2000.csv"))
PanCancer2001 <- read.csv( ("PancreaticCancer2001.csv"))
PanCancer2002 <- read.csv( ("PancreaticCancer2002.csv"))
PanCancer2003 <- read.csv( ("PancreaticCancer2003.csv"))
PanCancer2004 <- read.csv( ("PancreaticCancer2004.csv"))
PanCancer2005 <- read.csv( ("PancreaticCancer2005.csv"))
PanCancer2006 <- read.csv( ("PancreaticCancer2006.csv"))
PanCancer2007 <- read.csv( ("PancreaticCancer2007.csv"))
PanCancer2008 <- read.csv( ("PancreaticCancer2008.csv"))
PanCancer2009 <- read.csv( ("PancreaticCancer2009.csv"))
PanCancer2010 <- read.csv( ("PancreaticCancer2010.csv"))
PanCancer2011 <- read.csv( ("PancreaticCancer2011.csv"))
PanCancer2012 <- read.csv( ("PancreaticCancer2012.csv"))
PanCancer2013 <- read.csv( ("PancreaticCancer2013.csv"))
PanCancer2014 <- read.csv( ("PancreaticCancer2014.csv"))
PanCancer2015 <- read.csv( ("PancreaticCancer2015.csv"))
PanCancer2016 <- read.csv( ("PancreaticCancer2016.csv"))
PanCancer2017 <- read.csv( ("PancreaticCancer2017.csv"))
PanCancer2018 <- read.csv( ("PancreaticData2018.csv"))
PanCancer2019 <- read.csv( ("PancreaticData2019.csv"))
PanCancer2020 <- read.csv( ("PancreaticData2020.csv"))
MonthSurvival <- read.csv( ("MonthSurvival.csv"))
PanCancer2000$Medical.Record.Number <- as.character(PanCancer2000$Medical.Record.Number)
PanCancer2001$Medical.Record.Number <- as.character(PanCancer2001$Medical.Record.Number)
PanCancer2002$Medical.Record.Number <- as.character(PanCancer2002$Medical.Record.Number)
PanCancer2003$Medical.Record.Number <- as.character(PanCancer2003$Medical.Record.Number)
PanCancer2004$Medical.Record.Number <- as.character(PanCancer2004$Medical.Record.Number)
PanCancer2005$Medical.Record.Number <- as.character(PanCancer2005$Medical.Record.Number)
PanCancer2006$Medical.Record.Number <- as.character(PanCancer2006$Medical.Record.Number)
PanCancer2007$Medical.Record.Number <- as.character(PanCancer2007$Medical.Record.Number)
PanCancer2008$Medical.Record.Number <- as.character(PanCancer2008$Medical.Record.Number)
PanCancer2009$Medical.Record.Number <- as.character(PanCancer2009$Medical.Record.Number)
PanCancer2010$Medical.Record.Number <- as.character(PanCancer2010$Medical.Record.Number)
PanCancer2011$Medical.Record.Number <- as.character(PanCancer2011$Medical.Record.Number)
PanCancer2012$Medical.Record.Number <- as.character(PanCancer2012$Medical.Record.Number)
PanCancer2013$Medical.Record.Number <- as.character(PanCancer2013$Medical.Record.Number)
PanCancer2014$Medical.Record.Number <- as.character(PanCancer2014$Medical.Record.Number)
PanCancer2015$Medical.Record.Number <- as.character(PanCancer2015$Medical.Record.Number)
PanCancer2016$Medical.Record.Number <- as.character(PanCancer2016$Medical.Record.Number)
PanCancer2017$Medical.Record.Number <- as.character(PanCancer2017$Medical.Record.Number)
PanCancer2018$Medical.Record.Number <- as.character(PanCancer2018$Medical.Record.Number)
PanCancer2019$Medical.Record.Number <- as.character(PanCancer2019$Medical.Record.Number)
PanCancer2020$Medical.Record.Number <- as.character(PanCancer2020$Medical.Record.Number)
MonthSurvival$Medical.Record.Number <- as.character(MonthSurvival$Medical.Record.Number)
PanCancer2000$Postal.Code.at.Diagnosis <- as.character(PanCancer2000$Postal.Code.at.Diagnosis)
PanCancer2001$Postal.Code.at.Diagnosis <- as.character(PanCancer2001$Postal.Code.at.Diagnosis)
PanCancer2002$Postal.Code.at.Diagnosis <- as.character(PanCancer2002$Postal.Code.at.Diagnosis)
PanCancer2003$Postal.Code.at.Diagnosis <- as.character(PanCancer2003$Postal.Code.at.Diagnosis)
PanCancer2004$Postal.Code.at.Diagnosis <- as.character(PanCancer2004$Postal.Code.at.Diagnosis)
PanCancer2005$Postal.Code.at.Diagnosis <- as.character(PanCancer2005$Postal.Code.at.Diagnosis)
PanCancer2006$Postal.Code.at.Diagnosis <- as.character(PanCancer2006$Postal.Code.at.Diagnosis)
PanCancer2007$Postal.Code.at.Diagnosis <- as.character(PanCancer2007$Postal.Code.at.Diagnosis)
PanCancer2008$Postal.Code.at.Diagnosis <- as.character(PanCancer2008$Postal.Code.at.Diagnosis)
PanCancer2009$Postal.Code.at.Diagnosis <- as.character(PanCancer2009$Postal.Code.at.Diagnosis)
PanCancer2010$Postal.Code.at.Diagnosis <- as.character(PanCancer2010$Postal.Code.at.Diagnosis)
PanCancer2011$Postal.Code.at.Diagnosis <- as.character(PanCancer2011$Postal.Code.at.Diagnosis)
PanCancer2012$Postal.Code.at.Diagnosis <- as.character(PanCancer2012$Postal.Code.at.Diagnosis)
PanCancer2013$Postal.Code.at.Diagnosis <- as.character(PanCancer2013$Postal.Code.at.Diagnosis)
PanCancer2014$Postal.Code.at.Diagnosis <- as.character(PanCancer2014$Postal.Code.at.Diagnosis)
PanCancer2015$Postal.Code.at.Diagnosis <- as.character(PanCancer2015$Postal.Code.at.Diagnosis)
PanCancer2016$Postal.Code.at.Diagnosis <- as.character(PanCancer2016$Postal.Code.at.Diagnosis)
PanCancer2017$Postal.Code.at.Diagnosis <- as.character(PanCancer2017$Postal.Code.at.Diagnosis)
PanCancer2018$Postal.Code.at.Diagnosis <- as.character(PanCancer2018$Postal.Code.at.Diagnosis)
PanCancer2019$Postal.Code.at.Diagnosis <- as.character(PanCancer2019$Postal.Code.at.Diagnosis)
PanCancer2020$Postal.Code.at.Diagnosis <- as.character(PanCancer2020$Postal.Code.at.Diagnosis)
PanCancer2000$Tumor.Size.Summary <- as.character(PanCancer2000$Tumor.Size.Summary)
PanCancer2001$Tumor.Size.Summary <- as.character(PanCancer2001$Tumor.Size.Summary)
PanCancer2002$Tumor.Size.Summary <- as.character(PanCancer2002$Tumor.Size.Summary)
PanCancer2003$Tumor.Size.Summary <- as.character(PanCancer2003$Tumor.Size.Summary)
PanCancer2004$Tumor.Size.Summary <- as.character(PanCancer2004$Tumor.Size.Summary)
PanCancer2005$Tumor.Size.Summary <- as.character(PanCancer2005$Tumor.Size.Summary)
PanCancer2006$Tumor.Size.Summary <- as.character(PanCancer2006$Tumor.Size.Summary)
PanCancer2007$Tumor.Size.Summary <- as.character(PanCancer2007$Tumor.Size.Summary)
PanCancer2008$Tumor.Size.Summary <- as.character(PanCancer2008$Tumor.Size.Summary)
PanCancer2009$Tumor.Size.Summary <- as.character(PanCancer2009$Tumor.Size.Summary)
PanCancer2010$Tumor.Size.Summary <- as.character(PanCancer2010$Tumor.Size.Summary)
PanCancer2011$Tumor.Size.Summary <- as.character(PanCancer2011$Tumor.Size.Summary)
PanCancer2012$Tumor.Size.Summary <- as.character(PanCancer2012$Tumor.Size.Summary)
PanCancer2013$Tumor.Size.Summary <- as.character(PanCancer2013$Tumor.Size.Summary)
PanCancer2014$Tumor.Size.Summary <- as.character(PanCancer2014$Tumor.Size.Summary)
PanCancer2015$Tumor.Size.Summary <- as.character(PanCancer2015$Tumor.Size.Summary)
PanCancer2016$Tumor.Size.Summary <- as.character(PanCancer2016$Tumor.Size.Summary)
PanCancer2017$Tumor.Size.Summary <- as.character(PanCancer2017$Tumor.Size.Summary)
PanCancer2018$Tumor.Size.Summary <- as.character(PanCancer2018$Tumor.Size.Summary)
PanCancer2019$Tumor.Size.Summary <- as.character(PanCancer2019$Tumor.Size.Summary)
PanCancer2020$Tumor.Size.Summary <- as.character(PanCancer2020$Tumor.Size.Summary)
PanCancer2000$AJCC.Post.Therapy.N <- as.character(PanCancer2000$AJCC.Post.Therapy.N)
PanCancer2001$AJCC.Post.Therapy.N <- as.character(PanCancer2001$AJCC.Post.Therapy.N)
PanCancer2002$AJCC.Post.Therapy.N <- as.character(PanCancer2002$AJCC.Post.Therapy.N)
PanCancer2003$AJCC.Post.Therapy.N <- as.character(PanCancer2003$AJCC.Post.Therapy.N)
PanCancer2004$AJCC.Post.Therapy.N <- as.character(PanCancer2004$AJCC.Post.Therapy.N)
PanCancer2005$AJCC.Post.Therapy.N <- as.character(PanCancer2005$AJCC.Post.Therapy.N)
PanCancer2006$AJCC.Post.Therapy.N <- as.character(PanCancer2006$AJCC.Post.Therapy.N)
PanCancer2007$AJCC.Post.Therapy.N <- as.character(PanCancer2007$AJCC.Post.Therapy.N)
PanCancer2008$AJCC.Post.Therapy.N <- as.character(PanCancer2008$AJCC.Post.Therapy.N)
PanCancer2009$AJCC.Post.Therapy.N <- as.character(PanCancer2009$AJCC.Post.Therapy.N)
PanCancer2010$AJCC.Post.Therapy.N <- as.character(PanCancer2010$AJCC.Post.Therapy.N)
PanCancer2011$AJCC.Post.Therapy.N <- as.character(PanCancer2011$AJCC.Post.Therapy.N)
PanCancer2012$AJCC.Post.Therapy.N <- as.character(PanCancer2012$AJCC.Post.Therapy.N)
PanCancer2013$AJCC.Post.Therapy.N <- as.character(PanCancer2013$AJCC.Post.Therapy.N)
PanCancer2014$AJCC.Post.Therapy.N <- as.character(PanCancer2014$AJCC.Post.Therapy.N)
PanCancer2015$AJCC.Post.Therapy.N <- as.character(PanCancer2015$AJCC.Post.Therapy.N)
PanCancer2016$AJCC.Post.Therapy.N <- as.character(PanCancer2016$AJCC.Post.Therapy.N)
PanCancer2017$AJCC.Post.Therapy.N <- as.character(PanCancer2017$AJCC.Post.Therapy.N)
PanCancer2018$AJCC.Post.Therapy.N <- as.character(PanCancer2018$AJCC.Post.Therapy.N)
PanCancer2019$AJCC.Post.Therapy.N <- as.character(PanCancer2019$AJCC.Post.Therapy.N)
PanCancer2020$AJCC.Post.Therapy.N <- as.character(PanCancer2020$AJCC.Post.Therapy.N)
PanCancer2000$AJCC.Post.Therapy.T <- as.character(PanCancer2000$AJCC.Post.Therapy.T)
PanCancer2001$AJCC.Post.Therapy.T <- as.character(PanCancer2001$AJCC.Post.Therapy.T)
PanCancer2002$AJCC.Post.Therapy.T <- as.character(PanCancer2002$AJCC.Post.Therapy.T)
PanCancer2003$AJCC.Post.Therapy.T <- as.character(PanCancer2003$AJCC.Post.Therapy.T)
PanCancer2004$AJCC.Post.Therapy.T <- as.character(PanCancer2004$AJCC.Post.Therapy.T)
PanCancer2005$AJCC.Post.Therapy.T <- as.character(PanCancer2005$AJCC.Post.Therapy.T)
PanCancer2006$AJCC.Post.Therapy.T <- as.character(PanCancer2006$AJCC.Post.Therapy.T)
PanCancer2007$AJCC.Post.Therapy.T <- as.character(PanCancer2007$AJCC.Post.Therapy.T)
PanCancer2008$AJCC.Post.Therapy.T <- as.character(PanCancer2008$AJCC.Post.Therapy.T)
PanCancer2009$AJCC.Post.Therapy.T <- as.character(PanCancer2009$AJCC.Post.Therapy.T)
PanCancer2010$AJCC.Post.Therapy.T <- as.character(PanCancer2010$AJCC.Post.Therapy.T)
PanCancer2011$AJCC.Post.Therapy.T <- as.character(PanCancer2011$AJCC.Post.Therapy.T)
PanCancer2012$AJCC.Post.Therapy.T <- as.character(PanCancer2012$AJCC.Post.Therapy.T)
PanCancer2013$AJCC.Post.Therapy.T <- as.character(PanCancer2013$AJCC.Post.Therapy.T)
PanCancer2014$AJCC.Post.Therapy.T <- as.character(PanCancer2014$AJCC.Post.Therapy.T)
PanCancer2015$AJCC.Post.Therapy.T <- as.character(PanCancer2015$AJCC.Post.Therapy.T)
PanCancer2016$AJCC.Post.Therapy.T <- as.character(PanCancer2016$AJCC.Post.Therapy.T)
PanCancer2017$AJCC.Post.Therapy.T <- as.character(PanCancer2017$AJCC.Post.Therapy.T)
PanCancer2018$AJCC.Post.Therapy.T <- as.character(PanCancer2018$AJCC.Post.Therapy.T)
PanCancer2019$AJCC.Post.Therapy.T <- as.character(PanCancer2019$AJCC.Post.Therapy.T)
PanCancer2020$AJCC.Post.Therapy.T <- as.character(PanCancer2020$AJCC.Post.Therapy.T)
PanCancer2000$AJCC.Post.Therapy.M <- as.character(PanCancer2000$AJCC.Post.Therapy.M)
PanCancer2001$AJCC.Post.Therapy.M <- as.character(PanCancer2001$AJCC.Post.Therapy.M)
PanCancer2002$AJCC.Post.Therapy.M <- as.character(PanCancer2002$AJCC.Post.Therapy.M)
PanCancer2003$AJCC.Post.Therapy.M <- as.character(PanCancer2003$AJCC.Post.Therapy.M)
PanCancer2004$AJCC.Post.Therapy.M <- as.character(PanCancer2004$AJCC.Post.Therapy.M)
PanCancer2005$AJCC.Post.Therapy.M <- as.character(PanCancer2005$AJCC.Post.Therapy.M)
PanCancer2006$AJCC.Post.Therapy.M <- as.character(PanCancer2006$AJCC.Post.Therapy.M)
PanCancer2007$AJCC.Post.Therapy.M <- as.character(PanCancer2007$AJCC.Post.Therapy.M)
PanCancer2008$AJCC.Post.Therapy.M <- as.character(PanCancer2008$AJCC.Post.Therapy.M)
PanCancer2009$AJCC.Post.Therapy.M <- as.character(PanCancer2009$AJCC.Post.Therapy.M)
PanCancer2010$AJCC.Post.Therapy.M <- as.character(PanCancer2010$AJCC.Post.Therapy.M)
PanCancer2011$AJCC.Post.Therapy.M <- as.character(PanCancer2011$AJCC.Post.Therapy.M)
PanCancer2012$AJCC.Post.Therapy.M <- as.character(PanCancer2012$AJCC.Post.Therapy.M)
PanCancer2013$AJCC.Post.Therapy.M <- as.character(PanCancer2013$AJCC.Post.Therapy.M)
PanCancer2014$AJCC.Post.Therapy.M <- as.character(PanCancer2014$AJCC.Post.Therapy.M)
PanCancer2015$AJCC.Post.Therapy.M <- as.character(PanCancer2015$AJCC.Post.Therapy.M)
PanCancer2016$AJCC.Post.Therapy.M <- as.character(PanCancer2016$AJCC.Post.Therapy.M)
PanCancer2017$AJCC.Post.Therapy.M <- as.character(PanCancer2017$AJCC.Post.Therapy.M)
PanCancer2018$AJCC.Post.Therapy.M <- as.character(PanCancer2018$AJCC.Post.Therapy.M)
PanCancer2019$AJCC.Post.Therapy.M <- as.character(PanCancer2019$AJCC.Post.Therapy.M)
PanCancer2020$AJCC.Post.Therapy.M <- as.character(PanCancer2020$AJCC.Post.Therapy.M)
PanCancer2000$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2000$AJCC.Post.Therapy.Stage.Group)
PanCancer2001$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2001$AJCC.Post.Therapy.Stage.Group)
PanCancer2002$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2002$AJCC.Post.Therapy.Stage.Group)
PanCancer2003$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2003$AJCC.Post.Therapy.Stage.Group)
PanCancer2004$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2004$AJCC.Post.Therapy.Stage.Group)
PanCancer2005$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2005$AJCC.Post.Therapy.Stage.Group)
PanCancer2006$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2006$AJCC.Post.Therapy.Stage.Group)
PanCancer2007$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2007$AJCC.Post.Therapy.Stage.Group)
PanCancer2008$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2008$AJCC.Post.Therapy.Stage.Group)
PanCancer2009$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2009$AJCC.Post.Therapy.Stage.Group)
PanCancer2010$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2010$AJCC.Post.Therapy.Stage.Group)
PanCancer2011$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2011$AJCC.Post.Therapy.Stage.Group)
PanCancer2012$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2012$AJCC.Post.Therapy.Stage.Group)
PanCancer2013$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2013$AJCC.Post.Therapy.Stage.Group)
PanCancer2014$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2014$AJCC.Post.Therapy.Stage.Group)
PanCancer2015$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2015$AJCC.Post.Therapy.Stage.Group)
PanCancer2016$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2016$AJCC.Post.Therapy.Stage.Group)
PanCancer2017$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2017$AJCC.Post.Therapy.Stage.Group)
PanCancer2018$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2018$AJCC.Post.Therapy.Stage.Group)
PanCancer2019$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2019$AJCC.Post.Therapy.Stage.Group)
PanCancer2020$AJCC.Post.Therapy.Stage.Group <- as.character(PanCancer2020$AJCC.Post.Therapy.Stage.Group)
PanCancer2000$Primary.Surgeon.NPI <- as.character(PanCancer2000$Primary.Surgeon.NPI)
PanCancer2001$Primary.Surgeon.NPI <- as.character(PanCancer2001$Primary.Surgeon.NPI)
PanCancer2002$Primary.Surgeon.NPI <- as.character(PanCancer2002$Primary.Surgeon.NPI)
PanCancer2003$Primary.Surgeon.NPI <- as.character(PanCancer2003$Primary.Surgeon.NPI)
PanCancer2004$Primary.Surgeon.NPI <- as.character(PanCancer2004$Primary.Surgeon.NPI)
PanCancer2005$Primary.Surgeon.NPI <- as.character(PanCancer2005$Primary.Surgeon.NPI)
PanCancer2006$Primary.Surgeon.NPI <- as.character(PanCancer2006$Primary.Surgeon.NPI)
PanCancer2007$Primary.Surgeon.NPI <- as.character(PanCancer2007$Primary.Surgeon.NPI)
PanCancer2008$Primary.Surgeon.NPI <- as.character(PanCancer2008$Primary.Surgeon.NPI)
PanCancer2009$Primary.Surgeon.NPI <- as.character(PanCancer2009$Primary.Surgeon.NPI)
PanCancer2010$Primary.Surgeon.NPI <- as.character(PanCancer2010$Primary.Surgeon.NPI)
PanCancer2011$Primary.Surgeon.NPI <- as.character(PanCancer2011$Primary.Surgeon.NPI)
PanCancer2012$Primary.Surgeon.NPI <- as.character(PanCancer2012$Primary.Surgeon.NPI)
PanCancer2013$Primary.Surgeon.NPI <- as.character(PanCancer2013$Primary.Surgeon.NPI)
PanCancer2014$Primary.Surgeon.NPI <- as.character(PanCancer2014$Primary.Surgeon.NPI)
PanCancer2015$Primary.Surgeon.NPI <- as.character(PanCancer2015$Primary.Surgeon.NPI)
PanCancer2016$Primary.Surgeon.NPI <- as.character(PanCancer2016$Primary.Surgeon.NPI)
PanCancer2017$Primary.Surgeon.NPI <- as.character(PanCancer2017$Primary.Surgeon.NPI)
PanCancer2018$Primary.Surgeon.NPI <- as.character(PanCancer2018$Primary.Surgeon.NPI)
PanCancer2019$Primary.Surgeon.NPI <- as.character(PanCancer2019$Primary.Surgeon.NPI)
PanCancer2020$Primary.Surgeon.NPI <- as.character(PanCancer2020$Primary.Surgeon.NPI)
PanCancer2000$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2000$Radiation.Oncology.Physician.NPI)
PanCancer2001$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2001$Radiation.Oncology.Physician.NPI)
PanCancer2002$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2002$Radiation.Oncology.Physician.NPI)
PanCancer2003$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2003$Radiation.Oncology.Physician.NPI)
PanCancer2004$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2004$Radiation.Oncology.Physician.NPI)
PanCancer2005$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2005$Radiation.Oncology.Physician.NPI)
PanCancer2006$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2006$Radiation.Oncology.Physician.NPI)
PanCancer2007$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2007$Radiation.Oncology.Physician.NPI)
PanCancer2008$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2008$Radiation.Oncology.Physician.NPI)
PanCancer2009$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2009$Radiation.Oncology.Physician.NPI)
PanCancer2010$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2010$Radiation.Oncology.Physician.NPI)
PanCancer2011$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2011$Radiation.Oncology.Physician.NPI)
PanCancer2012$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2012$Radiation.Oncology.Physician.NPI)
PanCancer2013$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2013$Radiation.Oncology.Physician.NPI)
PanCancer2014$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2014$Radiation.Oncology.Physician.NPI)
PanCancer2015$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2015$Radiation.Oncology.Physician.NPI)
PanCancer2016$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2016$Radiation.Oncology.Physician.NPI)
PanCancer2017$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2017$Radiation.Oncology.Physician.NPI)
PanCancer2018$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2018$Radiation.Oncology.Physician.NPI)
PanCancer2019$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2019$Radiation.Oncology.Physician.NPI)
PanCancer2020$Radiation.Oncology.Physician.NPI <- as.character(PanCancer2020$Radiation.Oncology.Physician.NPI)
PanCancerAllYears <- bind_rows(PanCancer2000, PanCancer2001, PanCancer2002, PanCancer2003, PanCancer2004, PanCancer2005, PanCancer2005, PanCancer2006, PanCancer2007, PanCancer2008, PanCancer2009, PanCancer2010, PanCancer2011, PanCancer2012, PanCancer2013, PanCancer2014, PanCancer2015, PanCancer2016, PanCancer2017, PanCancer2018, PanCancer2019, PanCancer2020)
MonthSurvival <-
MonthSurvival %>%
select(Medical.Record.Number, Date.of.Last.Contact, Date.of.Initial.Diagnosis)
AllFinal <-
merge(MonthSurvival, PanCancerAllYears, by.x = "Medical.Record.Number", by.y = "Medical.Record.Number", all.x=F, all.y=FALSE)
AllFinal$Date.of.Initial.Diagnosis.y <- mdy(AllFinal$Date.of.Initial.Diagnosis.y)
AllFinal$Date.of.Last.Contact <- mdy(AllFinal$Date.of.Last.Contact)
## Warning: 8 failed to parse.
AllFinal$Date.of.First.Surgery <- mdy(AllFinal$Date.of.First.Surgery)
## Warning: 1129 failed to parse.
AllFinal$MonthDate <- (as.yearmon(AllFinal$Date.of.Last.Contact, format = "%m/%Y")-
as.yearmon(AllFinal$Date.of.Initial.Diagnosis.y, format = "%m/%Y"))*12
###removing duplicates
AllFinalUnique <-
AllFinal %>%
distinct()
LocalDataSet <- AllFinalUnique[!duplicated(AllFinalUnique[c("Medical.Record.Number")]),]
rm(PanCancer2000,PanCancer2001,PanCancer2002,PanCancer2003,PanCancer2004,PanCancer2005,PanCancer2006,PanCancer2007,PanCancer2008,PanCancer2009,PanCancer2010,PanCancer2011,PanCancer2012,PanCancer2013,PanCancer2014,PanCancer2015,PanCancer2016,PanCancer2017,PanCancer2018,PanCancer2019,PanCancer2020,PanCancerAllYears)
LocalDataSet4 <-
LocalDataSet %>%
mutate(LocalDataSet, Era = ifelse(Date.of.Initial.Diagnosis.y > "2011-01-01", "Era2",
ifelse(Date.of.Initial.Diagnosis.y > "2000-01-01", "Era1", NA)))
LocalDataSet4$Date.of.First.Surgery <- as.Date(LocalDataSet4$Date.of.First.Surgery)
LocalDataSet4 <-
LocalDataSet4 %>%
mutate(LocalDataSet4, Surgery = ifelse(Date.of.First.Surgery > "2000-01-01", "Yes",
ifelse(Date.of.First.Surgery == "No", "No","No")))
LocalDataSet4$Surgery[is.na(LocalDataSet4$Surgery)] <- "No"
table(LocalDataSet4$Surgery)
##
## No Yes
## 1061 515
LocalDataSet4$X1st.Course.Date.Radiation.Started <- mdy(LocalDataSet4$X1st.Course.Date.Radiation.Started)
## Warning: 1134 failed to parse.
LocalDataSet4 <-
LocalDataSet4 %>%
mutate(LocalDataSet4, Radiation = ifelse(X1st.Course.Date.Radiation.Started > "2000-01-01", "Yes",
ifelse(X1st.Course.Date.Radiation.Started == "No", "No","No")))
LocalDataSet4$Radiation[is.na(LocalDataSet4$Radiation)] <- "No"
table(LocalDataSet4$Radiation)
##
## No Yes
## 1134 442
LocalDataSet2 <- LocalDataSet1 %>% mutate(LocalDataSet1, StagingBest = ifelse(Best.Summary.Stage == “0”, “In situ”, NA))
LocalDataSet3 <- LocalDataSet2 %>% mutate(LocalDataSet2, StagingSummary = ifelse(Summary.Stage.2018 == “0 In situ”, “In Situ”, NA))
LocalDataSet4 <- LocalDataSet3 %>% unite(Staging, c(“Best.Summary.Stage”, “Summary.Stage.2018”))
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_0 In situ”] <- “In Situ” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “0_NA”] <- “In Situ”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_1 Localized”] <- “Localized” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “1_NA”] <- “Localized”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_2 Regional by direct extension only”] <- “Regional by direct extension only” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “2_NA”] <- “Regional by direct extension only”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_3 Regional lymph nodes only”] <- “Regional lymph nodes only” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “3_NA”] <- “Regional lymph nodes only”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_4 Regional by BOTH direct extension AND lymph node involvement”] <- “Regional by BOTH direct extension AND lymph node involvement” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “4_NA”] <- “Regional by BOTH direct extension AND lymph node involvement”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “5_NA”] <- NA
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_7 Distant site(s)/node(s) involved”] <- “Distant Site(s)/node(s) involved” LocalDataSet4\(Staging[LocalDataSet4\)Staging == “7_NA”] <- “Distant Site(s)/node(s) involved”
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_9 Unknown if extension or metastasis (unstaged, unknown, or unspecified); Death Certificate Only Case”] <- NA LocalDataSet4\(Staging[LocalDataSet4\)Staging == “9_NA”] <- NA
LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_NA”] <- NA LocalDataSet4\(Staging[LocalDataSet4\)Staging == “NA_”] <- NA
table(LocalDataSet4\(Staging) table(LocalDataSet4\)Race.1)
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "98 Other"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "02 Black"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "03 American Indian, Aleutian, or Eskimo"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "05 Japanese"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "04 Chinese"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "06 Filipino"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "10 Vietnamese"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "98 Other"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "99 Unknown"] <- "Non-White"
LocalDataSet4$Race.1[LocalDataSet4$Race.1 == "01 White"] <- "White"
table(LocalDataSet4$Race.1)
##
## Non-White White
## 24 1552
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "0"] <- "EminentlyResectable"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "1"] <- "EminentlyResectable"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "1A"] <- "EminentlyResectable"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "1B"] <- "EminentlyResectable"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "2"] <- "LocallyAdvanced"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "2A"] <- "LocallyAdvanced"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "2B"] <- "LocallyAdvanced"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "3"] <- "LocallyAdvanced"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "4"] <- "Stage4"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "4B"] <- "Stage4"
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "88"] <- NA
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == "99"] <- NA
LocalDataSet4$AJCC.Clinical.Stage.Group[LocalDataSet4$AJCC.Clinical.Stage.Group == ""] <- NA
table(LocalDataSet4$AJCC.Clinical.Stage.Group )
##
## EminentlyResectable LocallyAdvanced Stage4
## 309 559 482
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "00 None; chemotherapy not part of planned first course; autopsy only"] <- "No"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "87 Pt/pt`s guardian refused chemotherapy; refusal noted"] <- "No"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "86 Reason unknown for no chemo; recommended but not admin"] <- "No"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "82 Chemotherapy contraindicated due to pt risk factors"] <- "No"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "85 Chemo not admin; Pt died prior to planned/recommended therapy"] <- "No"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "01 Chemotherapy, NOS"] <- "Yes"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "02 Chemotherapy, single agent"] <- "Yes"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "03 Chemotherapy, multiple agents (combination regimen)"] <- "Yes"
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "88 Chemotherapy recommended, unk if administered"] <- NA
LocalDataSet4$X1st.Course.Chemotherapy.Summ[LocalDataSet4$X1st.Course.Chemotherapy.Summ == "99 Unk if chemotherapy recommended/administered; death cert only"] <- NA
table(LocalDataSet4$X1st.Course.Chemotherapy.Summ)
##
## No Yes
## 529 1018
table(LocalDataSet4$Marital.Status.at.DX)
##
## 1 Single (never married)
## 146
## 2 Married (including common law)
## 910
## 3 Separated
## 8
## 4 Divorced
## 161
## 5 Widowed
## 234
## 6 Unmarried or Domestic Partner (same sex or opposite sex, registered or unregistered, other than common law marriage)
## 35
## 9 Unknown
## 82
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "1 Single (never married)"] <- "Single"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "2 Married (including common law)"] <- "Married"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "3 Separated"] <- "Divorced/Separated"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "4 Divorced"] <- "Divorced/Separated"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "5 Widowed"] <- "Widowed"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "6 Unmarried or Domestic Partner (same sex or opposite sex, registered or unregistered, other than common law marriage)"] <- "Single"
LocalDataSet4$Marital.Status.at.DX[LocalDataSet4$Marital.Status.at.DX == "9 Unknown"] <- NA
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "01 Not Insured"] <- "Uninsured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "02 Not Insured, self pay"] <- "Uninsured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "20 Private Ins: Managed care, HMO, PPO"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "31 Medicaid"] <- "Medicaid"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "35 Medicaid - Admin through Managed Care Plan"] <- "Medicaid"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "60 Medicare w/o supplement, Medicare, NOS"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "61 Medicare with supplement, NOS"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "62 Medicare - Admin through Managed Care Plan"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "63 Medicare with private supplement"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "64 Medicare with Medicaid eligibility"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "64 Medicare with Medicaid eligibility"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "65 TRICARE"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "66 Military"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "67 Veterans Affairs"] <- "Insured"
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "99 Insurance status unknown"] <- NA
LocalDataSet4$Primary.Payer.at.DX[LocalDataSet4$Primary.Payer.at.DX == "10 Insurance, NOS"] <- NA
table(LocalDataSet4$Primary.Payer.at.DX)
##
## Insured Medicaid Uninsured
## 1308 77 26
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "80133 Large cell neuroendocrine carcinoma"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "81503 Pancreatic endocrine tumor, malignant (C25._)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "80313 Giant cell carcinoma"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "80703 Squamous cell carcinoma, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "81513 Insulinoma, malignant"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "81533 Gastrinoma, malignant"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "81503 Islet cell carcinoma (C25._)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "81581 Endocrine tumor, functioning, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82403 Carcinoid tumor, NOS (except of appendix)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82403 Carcinoid, NOS (except of appendix)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82403 Neuroendocrine carcinoma, low grade"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82403 Neuroendocrine carcinoma, well-differentiated"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82403 Neuroendocrine tumor, grade 1"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82493 Neuroendocrine tumor, grade 2"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82463 Neuroendocrine tumor, well differentiated (C50._)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "82463 Neuroendocrine carcinoma, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "84532 Intraductal papillary mucinous neoplasm with high-grade dysplasia (C25._)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "84532 Intraductal papillary-mucinous carcinoma, non-invasive"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "84533 Intraductal papillary mucinous neoplasm (IPMN) with an associated invasive carcinoma (C25._)"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "84533 Intraductal papillary-mucinous carcinoma, invasive"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "88903 Leiomyosarcoma, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "89363 GIST, malignant"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "92603 Ewing sarcoma"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "95913 Non-Hodgkin lymphoma, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "96803 Lymphoma, diffuse large B-cell, NOS"] <- NA
LocalDataSet4$Histo.Behavior.ICD.O.3[LocalDataSet4$Histo.Behavior.ICD.O.3 == "96803 Lymphoma, malig, large B-cell, diffuse, (DLBCL), NOS"] <- NA
table(LocalDataSet4$Histo.Behavior.ICD.O.3)
##
##
## 3
## 80003 Cancer
## 4
## 80003 Malignancy
## 1
## 80003 Neoplasm, malignant
## 8
## 80003 Tumor, malignant, NOS
## 1
## 80102 Carcinoma in situ, NOS
## 1
## 80103 Carcinoma, NOS
## 29
## 80213 Carcinoma, anaplastic, NOS
## 1
## 80333 Sarcomatoid carcinoma
## 1
## 80413 Small cell carcinoma, NOS
## 1
## 80463 Non-small cell carcinoma
## 8
## 81403 Adenocarcinoma, NOS
## 1204
## 81443 Adenocarcinoma, intestinal type
## 2
## 81543 Mixed islet cell and exocrine adenocarcinoma
## 1
## 82443 Carcinoid and adenocarcinoma, combined
## 1
## 82443 Mixed adenoneuroendocrine carcinoma
## 1
## 82553 Adenocarcinoma with mixed subtypes
## 4
## 83233 Mixed cell adenocarcinoma
## 1
## 84403 Cystadenocarcinoma, NOS
## 1
## 84523 Solid pseudopapillary carcinoma
## 4
## 84803 Colloid carcinoma
## 1
## 84803 Mucinous adenocarcinoma
## 22
## 84803 Mucinous carcinoma
## 2
## 84803 Mucous adenocarcinoma
## 1
## 84813 Mucin-producing adenocarcinoma
## 2
## 84903 Signet ring cell adenocarcinoma
## 1
## 84903 Signet ring cell carcinoma
## 2
## 85003 Duct adenocarcinoma, NOS
## 40
## 85003 Duct carcinoma, NOS
## 1
## 85003 Ductal carcinoma, NOS
## 55
## 85003 Infiltrating duct adenocarcinoma
## 16
## 85003 Infiltrating duct carcinoma, NOS
## 28
## 85213 Infiltrating ductular carcinoma
## 7
## 85503 Acinar cell carcinoma
## 1
## 85503 Acinic cell adenocarcinoma
## 1
## 85603 Adenosquamous carcinoma
## 6
## 85753 Metaplastic carcinoma, NOS
## 1
LocalDataSetDT <-
LocalDataSet4 %>%
select(Age.at.Diagnosis, Sex, Race.1, Primary.Payer.at.DX, Marital.Status.at.DX, Histo.Behavior.ICD.O.3, Era, AJCC.Clinical.Stage.Group, Vital.Status, MonthDate, Surgery, X1st.Course.Chemotherapy.Summ, Radiation)
DTLocalDataStage4 <-
subset(LocalDataSetDT, AJCC.Clinical.Stage.Group == "Stage4")
DTLocalized <-
subset(LocalDataSetDT, AJCC.Clinical.Stage.Group == "LocallyAdvanced" | AJCC.Clinical.Stage.Group == "EminentlyResectable")
DTLocallyAdvanced <-
subset(LocalDataSetDT, AJCC.Clinical.Stage.Group == "LocallyAdvanced")
DTEminentlyResectable <-
subset(LocalDataSetDT, AJCC.Clinical.Stage.Group == "EminentlyResectable")
DTSurgery <-
subset(LocalDataSetDT, Surgery == "Yes")
DTSurgery$AJCC.Clinical.Stage.Group[DTSurgery$AJCC.Clinical.Stage.Group == "Stage4"] <- NA
table(DTLocalized$AJCC.Clinical.Stage.Group)
##
## EminentlyResectable LocallyAdvanced
## 309 559
DTSurgery <-
DTSurgery %>%
select(Age.at.Diagnosis, Sex, Race.1, Primary.Payer.at.DX, Marital.Status.at.DX, Histo.Behavior.ICD.O.3, Era, AJCC.Clinical.Stage.Group, Vital.Status, MonthDate, X1st.Course.Chemotherapy.Summ, Radiation)
LocalDataSetDT %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table Everyone Era1 vs Era2*") %>%
bold_labels()
## 4 observations missing `Era` have been removed. To include these observations, use `forcats::fct_explicit_na()` on `Era` column before passing to `tbl_summary()`.
## There was an error in 'add_p()' for variable 'Histo.Behavior.ICD.O.3', p-value omitted:
## Error in stats::fisher.test(data[[variable]], as.factor(data[[by]])): FEXACT error 7(location). LDSTP=18180 is too small for this problem,
## (pastp=6.29157, ipn_0:=ipoin[itp=298]=6073, stp[ipn_0]=5.63479).
## Increase workspace or consider using 'simulate.p.value=TRUE'
Variable | Overall, N = 1,5721 | *Demographic Table Everyone Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 5621 | Era2, N = 1,0101 | |||
Age.at.Diagnosis | 69.00 (61.00, 77.00) | 69.00 (60.00, 77.00) | 69.00 (62.00, 77.00) | 0.70 |
Sex | 0.99 | |||
1 Male | 813 (52%) | 290 (52%) | 523 (52%) | |
2 Female | 759 (48%) | 272 (48%) | 487 (48%) | |
Race.1 | 0.64 | |||
Non-White | 21 (1.3%) | 6 (1.1%) | 15 (1.5%) | |
White | 1,551 (99%) | 556 (99%) | 995 (99%) | |
Primary.Payer.at.DX | 0.038 | |||
Insured | 1,308 (93%) | 445 (94%) | 863 (92%) | |
Medicaid | 77 (5.5%) | 17 (3.6%) | 60 (6.4%) | |
Uninsured | 26 (1.8%) | 12 (2.5%) | 14 (1.5%) | |
Unknown | 161 | 88 | 73 | |
Marital.Status.at.DX | 0.004 | |||
Divorced/Separated | 169 (11%) | 54 (10%) | 115 (12%) | |
Married | 910 (61%) | 342 (65%) | 568 (59%) | |
Single | 181 (12%) | 44 (8.3%) | 137 (14%) | |
Widowed | 234 (16%) | 90 (17%) | 144 (15%) | |
Unknown | 78 | 32 | 46 | |
Histo.Behavior.ICD.O.3 | ||||
80003 Cancer | 3 (0.2%) | 0 (0%) | 3 (0.3%) | |
80003 Malignancy | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
80003 Neoplasm, malignant | 8 (0.5%) | 5 (0.9%) | 3 (0.3%) | |
80003 Tumor, malignant, NOS | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
80102 Carcinoma in situ, NOS | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
80103 Carcinoma, NOS | 29 (2.0%) | 20 (3.7%) | 9 (1.0%) | |
80213 Carcinoma, anaplastic, NOS | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
80333 Sarcomatoid carcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
80413 Small cell carcinoma, NOS | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
80463 Non-small cell carcinoma | 8 (0.5%) | 8 (1.5%) | 0 (0%) | |
81403 Adenocarcinoma, NOS | 1,204 (82%) | 470 (87%) | 734 (80%) | |
81443 Adenocarcinoma, intestinal type | 2 (0.1%) | 0 (0%) | 2 (0.2%) | |
81543 Mixed islet cell and exocrine adenocarcinoma | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
82443 Carcinoid and adenocarcinoma, combined | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
82443 Mixed adenoneuroendocrine carcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
82553 Adenocarcinoma with mixed subtypes | 4 (0.3%) | 1 (0.2%) | 3 (0.3%) | |
83233 Mixed cell adenocarcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
84403 Cystadenocarcinoma, NOS | 1 (<0.1%) | 1 (0.2%) | 0 (0%) | |
84523 Solid pseudopapillary carcinoma | 4 (0.3%) | 0 (0%) | 4 (0.4%) | |
84803 Colloid carcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
84803 Mucinous adenocarcinoma | 22 (1.5%) | 9 (1.7%) | 13 (1.4%) | |
84803 Mucinous carcinoma | 2 (0.1%) | 0 (0%) | 2 (0.2%) | |
84803 Mucous adenocarcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
84813 Mucin-producing adenocarcinoma | 2 (0.1%) | 2 (0.4%) | 0 (0%) | |
84903 Signet ring cell adenocarcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
84903 Signet ring cell carcinoma | 2 (0.1%) | 2 (0.4%) | 0 (0%) | |
85003 Duct adenocarcinoma, NOS | 40 (2.7%) | 8 (1.5%) | 32 (3.5%) | |
85003 Duct carcinoma, NOS | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
85003 Ductal carcinoma, NOS | 55 (3.8%) | 0 (0%) | 55 (6.0%) | |
85003 Infiltrating duct adenocarcinoma | 16 (1.1%) | 2 (0.4%) | 14 (1.5%) | |
85003 Infiltrating duct carcinoma, NOS | 28 (1.9%) | 6 (1.1%) | 22 (2.4%) | |
85213 Infiltrating ductular carcinoma | 7 (0.5%) | 0 (0%) | 7 (0.8%) | |
85503 Acinar cell carcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
85503 Acinic cell adenocarcinoma | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
85603 Adenosquamous carcinoma | 6 (0.4%) | 2 (0.4%) | 4 (0.4%) | |
85753 Metaplastic carcinoma, NOS | 1 (<0.1%) | 0 (0%) | 1 (0.1%) | |
Unknown | 112 | 21 | 91 | |
AJCC.Clinical.Stage.Group | <0.001 | |||
EminentlyResectable | 309 (23%) | 57 (13%) | 252 (27%) | |
LocallyAdvanced | 559 (41%) | 202 (47%) | 357 (39%) | |
Stage4 | 482 (36%) | 170 (40%) | 312 (34%) | |
Unknown | 222 | 133 | 89 | |
Vital.Status | <0.001 | |||
0 Dead | 1,284 (82%) | 536 (95%) | 748 (74%) | |
1 Alive | 288 (18%) | 26 (4.6%) | 262 (26%) | |
MonthDate | 8.00 (3.00, 17.00) | 8.00 (3.00, 14.00) | 8.00 (3.00, 18.00) | 0.59 |
Unknown | 4 | 0 | 4 | |
Surgery | 515 (33%) | 131 (23%) | 384 (38%) | <0.001 |
X1st.Course.Chemotherapy.Summ | 1,018 (66%) | 372 (67%) | 646 (65%) | 0.46 |
Unknown | 29 | 9 | 20 | |
Radiation | 442 (28%) | 197 (35%) | 245 (24%) | <0.001 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence
|
DTSurgery %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table Surgical Patients Era1 vs Era2*") %>%
bold_labels()
## There was an error in 'add_p()' for variable 'Histo.Behavior.ICD.O.3', p-value omitted:
## Error in stats::fisher.test(data[[variable]], as.factor(data[[by]])): FEXACT error 7(location). LDSTP=18540 is too small for this problem,
## (pastp=13.5846, ipn_0:=ipoin[itp=208]=1370, stp[ipn_0]=14.0366).
## Increase workspace or consider using 'simulate.p.value=TRUE'
Variable | Overall, N = 5151 | *Demographic Table Surgical Patients Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 1311 | Era2, N = 3841 | |||
Age.at.Diagnosis | 66.00 (58.00, 73.00) | 65.00 (57.50, 72.00) | 67.00 (58.75, 73.00) | 0.34 |
Sex | 0.21 | |||
1 Male | 270 (52%) | 62 (47%) | 208 (54%) | |
2 Female | 245 (48%) | 69 (53%) | 176 (46%) | |
Race.1 | >0.99 | |||
Non-White | 11 (2.1%) | 3 (2.3%) | 8 (2.1%) | |
White | 504 (98%) | 128 (98%) | 376 (98%) | |
Primary.Payer.at.DX | 0.18 | |||
Insured | 430 (92%) | 99 (90%) | 331 (92%) | |
Medicaid | 34 (7.2%) | 8 (7.3%) | 26 (7.2%) | |
Uninsured | 5 (1.1%) | 3 (2.7%) | 2 (0.6%) | |
Unknown | 46 | 21 | 25 | |
Marital.Status.at.DX | 0.16 | |||
Divorced/Separated | 58 (12%) | 14 (11%) | 44 (12%) | |
Married | 310 (63%) | 87 (71%) | 223 (61%) | |
Single | 74 (15%) | 12 (9.8%) | 62 (17%) | |
Widowed | 49 (10.0%) | 10 (8.1%) | 39 (11%) | |
Unknown | 24 | 8 | 16 | |
Histo.Behavior.ICD.O.3 | ||||
80003 Neoplasm, malignant | 1 (0.2%) | 1 (0.8%) | 0 (0%) | |
80102 Carcinoma in situ, NOS | 1 (0.2%) | 1 (0.8%) | 0 (0%) | |
81403 Adenocarcinoma, NOS | 278 (62%) | 92 (78%) | 186 (57%) | |
81443 Adenocarcinoma, intestinal type | 2 (0.4%) | 0 (0%) | 2 (0.6%) | |
81543 Mixed islet cell and exocrine adenocarcinoma | 1 (0.2%) | 1 (0.8%) | 0 (0%) | |
82443 Carcinoid and adenocarcinoma, combined | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
82443 Mixed adenoneuroendocrine carcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
82553 Adenocarcinoma with mixed subtypes | 3 (0.7%) | 0 (0%) | 3 (0.9%) | |
83233 Mixed cell adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
84523 Solid pseudopapillary carcinoma | 3 (0.7%) | 0 (0%) | 3 (0.9%) | |
84803 Colloid carcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
84803 Mucinous adenocarcinoma | 11 (2.5%) | 5 (4.2%) | 6 (1.8%) | |
84803 Mucinous carcinoma | 2 (0.4%) | 0 (0%) | 2 (0.6%) | |
84803 Mucous adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85003 Duct adenocarcinoma, NOS | 37 (8.3%) | 8 (6.8%) | 29 (8.8%) | |
85003 Duct carcinoma, NOS | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85003 Ductal carcinoma, NOS | 47 (11%) | 0 (0%) | 47 (14%) | |
85003 Infiltrating duct adenocarcinoma | 15 (3.4%) | 2 (1.7%) | 13 (4.0%) | |
85003 Infiltrating duct carcinoma, NOS | 26 (5.8%) | 6 (5.1%) | 20 (6.1%) | |
85213 Infiltrating ductular carcinoma | 7 (1.6%) | 0 (0%) | 7 (2.1%) | |
85603 Adenosquamous carcinoma | 5 (1.1%) | 2 (1.7%) | 3 (0.9%) | |
85753 Metaplastic carcinoma, NOS | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
Unknown | 69 | 13 | 56 | |
AJCC.Clinical.Stage.Group | 0.13 | |||
EminentlyResectable | 176 (48%) | 26 (39%) | 150 (50%) | |
LocallyAdvanced | 191 (52%) | 41 (61%) | 150 (50%) | |
Unknown | 148 | 64 | 84 | |
Vital.Status | <0.001 | |||
0 Dead | 343 (67%) | 114 (87%) | 229 (60%) | |
1 Alive | 172 (33%) | 17 (13%) | 155 (40%) | |
MonthDate | 19.00 (10.00, 36.00) | 20.00 (11.00, 39.00) | 18.00 (9.00, 34.50) | 0.12 |
Unknown | 1 | 0 | 1 | |
X1st.Course.Chemotherapy.Summ | 380 (75%) | 98 (76%) | 282 (75%) | 0.85 |
Unknown | 8 | 2 | 6 | |
Radiation | 207 (40%) | 68 (52%) | 139 (36%) | 0.002 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence; Fisher's exact test
|
DTEminentlyResectable %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table EminentlyResectable Era1 vs Era2*") %>%
bold_labels()
## There was an error in 'add_p()' for variable 'AJCC.Clinical.Stage.Group', p-value omitted:
## Error in stats::chisq.test(data[[variable]], as.factor(data[[by]])): 'x' and 'y' must have at least 2 levels
Variable | Overall, N = 3091 | *Demographic Table EminentlyResectable Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 571 | Era2, N = 2521 | |||
Age.at.Diagnosis | 69.00 (61.00, 77.00) | 68.00 (63.00, 78.00) | 69.00 (61.00, 77.00) | 0.39 |
Sex | 0.91 | |||
1 Male | 147 (48%) | 28 (49%) | 119 (47%) | |
2 Female | 162 (52%) | 29 (51%) | 133 (53%) | |
Race.1 | 0.56 | |||
Non-White | 4 (1.3%) | 1 (1.8%) | 3 (1.2%) | |
White | 305 (99%) | 56 (98%) | 249 (99%) | |
Primary.Payer.at.DX | >0.99 | |||
Insured | 266 (94%) | 41 (95%) | 225 (94%) | |
Medicaid | 16 (5.7%) | 2 (4.7%) | 14 (5.8%) | |
Uninsured | 1 (0.4%) | 0 (0%) | 1 (0.4%) | |
Unknown | 26 | 14 | 12 | |
Marital.Status.at.DX | 0.083 | |||
Divorced/Separated | 30 (10%) | 2 (3.8%) | 28 (11%) | |
Married | 174 (59%) | 37 (70%) | 137 (56%) | |
Single | 38 (13%) | 3 (5.7%) | 35 (14%) | |
Widowed | 55 (19%) | 11 (21%) | 44 (18%) | |
Unknown | 12 | 4 | 8 | |
Histo.Behavior.ICD.O.3 | 0.20 | |||
80003 Malignancy | 1 (0.4%) | 0 (0%) | 1 (0.5%) | |
80003 Neoplasm, malignant | 2 (0.8%) | 1 (1.9%) | 1 (0.5%) | |
81403 Adenocarcinoma, NOS | 199 (75%) | 47 (89%) | 152 (71%) | |
82553 Adenocarcinoma with mixed subtypes | 1 (0.4%) | 0 (0%) | 1 (0.5%) | |
84523 Solid pseudopapillary carcinoma | 3 (1.1%) | 0 (0%) | 3 (1.4%) | |
84803 Mucinous adenocarcinoma | 2 (0.8%) | 1 (1.9%) | 1 (0.5%) | |
85003 Duct adenocarcinoma, NOS | 13 (4.9%) | 2 (3.8%) | 11 (5.2%) | |
85003 Duct carcinoma, NOS | 1 (0.4%) | 0 (0%) | 1 (0.5%) | |
85003 Ductal carcinoma, NOS | 24 (9.0%) | 0 (0%) | 24 (11%) | |
85003 Infiltrating duct adenocarcinoma | 6 (2.3%) | 1 (1.9%) | 5 (2.3%) | |
85003 Infiltrating duct carcinoma, NOS | 10 (3.8%) | 1 (1.9%) | 9 (4.2%) | |
85213 Infiltrating ductular carcinoma | 1 (0.4%) | 0 (0%) | 1 (0.5%) | |
85603 Adenosquamous carcinoma | 2 (0.8%) | 0 (0%) | 2 (0.9%) | |
85753 Metaplastic carcinoma, NOS | 1 (0.4%) | 0 (0%) | 1 (0.5%) | |
Unknown | 43 | 4 | 39 | |
AJCC.Clinical.Stage.Group | ||||
EminentlyResectable | 309 (100%) | 57 (100%) | 252 (100%) | |
Vital.Status | <0.001 | |||
0 Dead | 202 (65%) | 52 (91%) | 150 (60%) | |
1 Alive | 107 (35%) | 5 (8.8%) | 102 (40%) | |
MonthDate | 13.00 (6.00, 27.50) | 14.00 (7.00, 31.00) | 12.00 (6.00, 27.00) | 0.56 |
Unknown | 2 | 0 | 2 | |
Surgery | 176 (57%) | 26 (46%) | 150 (60%) | 0.077 |
X1st.Course.Chemotherapy.Summ | 203 (66%) | 35 (61%) | 168 (67%) | 0.50 |
Unknown | 2 | 0 | 2 | |
Radiation | 109 (35%) | 26 (46%) | 83 (33%) | 0.10 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence; Fisher's exact test
|
DTLocalDataStage4 %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table Stage 4 Era1 vs Era2*") %>%
bold_labels()
## Warning in 'add_p()' for variable 'Primary.Payer.at.DX':
## simpleWarning in stats::chisq.test(data[[variable]], as.factor(data[[by]])): Chi-squared approximation may be incorrect
## There was an error in 'add_p()' for variable 'AJCC.Clinical.Stage.Group', p-value omitted:
## Error in stats::chisq.test(data[[variable]], as.factor(data[[by]])): 'x' and 'y' must have at least 2 levels
Variable | Overall, N = 4821 | *Demographic Table Stage 4 Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 1701 | Era2, N = 3121 | |||
Age.at.Diagnosis | 69.00 (61.00, 76.00) | 69.00 (60.00, 75.75) | 69.00 (61.00, 76.00) | 0.56 |
Sex | 0.13 | |||
1 Male | 271 (56%) | 104 (61%) | 167 (54%) | |
2 Female | 211 (44%) | 66 (39%) | 145 (46%) | |
Race.1 | >0.99 | |||
Non-White | 6 (1.2%) | 2 (1.2%) | 4 (1.3%) | |
White | 476 (99%) | 168 (99%) | 308 (99%) | |
Primary.Payer.at.DX | 0.18 | |||
Insured | 392 (92%) | 133 (94%) | 259 (91%) | |
Medicaid | 20 (4.7%) | 3 (2.1%) | 17 (6.0%) | |
Uninsured | 15 (3.5%) | 6 (4.2%) | 9 (3.2%) | |
Unknown | 55 | 28 | 27 | |
Marital.Status.at.DX | 0.52 | |||
Divorced/Separated | 65 (14%) | 23 (14%) | 42 (14%) | |
Married | 275 (61%) | 103 (64%) | 172 (59%) | |
Single | 51 (11%) | 14 (8.8%) | 37 (13%) | |
Widowed | 63 (14%) | 20 (12%) | 43 (15%) | |
Unknown | 28 | 10 | 18 | |
Histo.Behavior.ICD.O.3 | 0.014 | |||
80003 Cancer | 2 (0.4%) | 0 (0%) | 2 (0.7%) | |
80003 Neoplasm, malignant | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
80003 Tumor, malignant, NOS | 1 (0.2%) | 1 (0.6%) | 0 (0%) | |
80103 Carcinoma, NOS | 13 (2.8%) | 7 (4.1%) | 6 (2.0%) | |
80333 Sarcomatoid carcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
80413 Small cell carcinoma, NOS | 1 (0.2%) | 1 (0.6%) | 0 (0%) | |
80463 Non-small cell carcinoma | 5 (1.1%) | 5 (3.0%) | 0 (0%) | |
81403 Adenocarcinoma, NOS | 409 (88%) | 148 (88%) | 261 (89%) | |
82553 Adenocarcinoma with mixed subtypes | 2 (0.4%) | 1 (0.6%) | 1 (0.3%) | |
84803 Mucinous adenocarcinoma | 12 (2.6%) | 3 (1.8%) | 9 (3.1%) | |
84813 Mucin-producing adenocarcinoma | 2 (0.4%) | 2 (1.2%) | 0 (0%) | |
84903 Signet ring cell adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
84903 Signet ring cell carcinoma | 1 (0.2%) | 1 (0.6%) | 0 (0%) | |
85003 Duct adenocarcinoma, NOS | 3 (0.6%) | 0 (0%) | 3 (1.0%) | |
85003 Ductal carcinoma, NOS | 4 (0.9%) | 0 (0%) | 4 (1.4%) | |
85003 Infiltrating duct adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85003 Infiltrating duct carcinoma, NOS | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85503 Acinar cell carcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85503 Acinic cell adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85603 Adenosquamous carcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
Unknown | 19 | 1 | 18 | |
AJCC.Clinical.Stage.Group | ||||
Stage4 | 482 (100%) | 170 (100%) | 312 (100%) | |
Vital.Status | <0.001 | |||
0 Dead | 440 (91%) | 168 (99%) | 272 (87%) | |
1 Alive | 42 (8.7%) | 2 (1.2%) | 40 (13%) | |
MonthDate | 4.00 (2.00, 9.00) | 4.00 (2.00, 8.00) | 4.00 (1.75, 9.00) | 0.59 |
Surgery | 45 (9.3%) | 9 (5.3%) | 36 (12%) | 0.037 |
X1st.Course.Chemotherapy.Summ | 299 (63%) | 108 (64%) | 191 (62%) | 0.73 |
Unknown | 7 | 2 | 5 | |
Radiation | 38 (7.9%) | 21 (12%) | 17 (5.4%) | 0.012 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence; Fisher's exact test
|
DTLocalized %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table Localized Era1 vs Era2*") %>%
bold_labels()
## There was an error in 'add_p()' for variable 'Histo.Behavior.ICD.O.3', p-value omitted:
## Error in stats::fisher.test(data[[variable]], as.factor(data[[by]])): FEXACT error 7(location). LDSTP=18480 is too small for this problem,
## (pastp=14.9639, ipn_0:=ipoin[itp=152]=14651, stp[ipn_0]=6.85118).
## Increase workspace or consider using 'simulate.p.value=TRUE'
Variable | Overall, N = 8681 | *Demographic Table Localized Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 2591 | Era2, N = 6091 | |||
Age.at.Diagnosis | 70.00 (61.00, 77.00) | 70.00 (61.00, 78.00) | 70.00 (62.00, 77.00) | 0.53 |
Sex | 0.67 | |||
1 Male | 427 (49%) | 124 (48%) | 303 (50%) | |
2 Female | 441 (51%) | 135 (52%) | 306 (50%) | |
Race.1 | >0.99 | |||
Non-White | 11 (1.3%) | 3 (1.2%) | 8 (1.3%) | |
White | 857 (99%) | 256 (99%) | 601 (99%) | |
Primary.Payer.at.DX | 0.022 | |||
Insured | 742 (94%) | 211 (96%) | 531 (93%) | |
Medicaid | 41 (5.2%) | 5 (2.3%) | 36 (6.3%) | |
Uninsured | 8 (1.0%) | 4 (1.8%) | 4 (0.7%) | |
Unknown | 77 | 39 | 38 | |
Marital.Status.at.DX | 0.006 | |||
Divorced/Separated | 84 (10%) | 18 (7.3%) | 66 (11%) | |
Married | 509 (61%) | 164 (67%) | 345 (59%) | |
Single | 103 (12%) | 18 (7.3%) | 85 (14%) | |
Widowed | 138 (17%) | 46 (19%) | 92 (16%) | |
Unknown | 34 | 13 | 21 | |
Histo.Behavior.ICD.O.3 | ||||
80003 Malignancy | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
80003 Neoplasm, malignant | 3 (0.4%) | 2 (0.8%) | 1 (0.2%) | |
80103 Carcinoma, NOS | 9 (1.1%) | 7 (2.8%) | 2 (0.4%) | |
80213 Carcinoma, anaplastic, NOS | 1 (0.1%) | 1 (0.4%) | 0 (0%) | |
80463 Non-small cell carcinoma | 3 (0.4%) | 3 (1.2%) | 0 (0%) | |
81403 Adenocarcinoma, NOS | 650 (81%) | 222 (88%) | 428 (78%) | |
81443 Adenocarcinoma, intestinal type | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
82443 Carcinoid and adenocarcinoma, combined | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
82553 Adenocarcinoma with mixed subtypes | 2 (0.2%) | 0 (0%) | 2 (0.4%) | |
84523 Solid pseudopapillary carcinoma | 3 (0.4%) | 0 (0%) | 3 (0.5%) | |
84803 Mucinous adenocarcinoma | 8 (1.0%) | 5 (2.0%) | 3 (0.5%) | |
84803 Mucinous carcinoma | 2 (0.2%) | 0 (0%) | 2 (0.4%) | |
84803 Mucous adenocarcinoma | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
85003 Duct adenocarcinoma, NOS | 30 (3.7%) | 6 (2.4%) | 24 (4.4%) | |
85003 Duct carcinoma, NOS | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
85003 Ductal carcinoma, NOS | 38 (4.7%) | 0 (0%) | 38 (6.9%) | |
85003 Infiltrating duct adenocarcinoma | 15 (1.9%) | 2 (0.8%) | 13 (2.4%) | |
85003 Infiltrating duct carcinoma, NOS | 21 (2.6%) | 3 (1.2%) | 18 (3.3%) | |
85213 Infiltrating ductular carcinoma | 7 (0.9%) | 0 (0%) | 7 (1.3%) | |
85603 Adenosquamous carcinoma | 3 (0.4%) | 1 (0.4%) | 2 (0.4%) | |
85753 Metaplastic carcinoma, NOS | 1 (0.1%) | 0 (0%) | 1 (0.2%) | |
Unknown | 67 | 7 | 60 | |
AJCC.Clinical.Stage.Group | <0.001 | |||
EminentlyResectable | 309 (36%) | 57 (22%) | 252 (41%) | |
LocallyAdvanced | 559 (64%) | 202 (78%) | 357 (59%) | |
Vital.Status | <0.001 | |||
0 Dead | 670 (77%) | 249 (96%) | 421 (69%) | |
1 Alive | 198 (23%) | 10 (3.9%) | 188 (31%) | |
MonthDate | 10.00 (5.00, 22.00) | 10.00 (6.00, 18.50) | 11.00 (5.00, 24.00) | 0.31 |
Unknown | 2 | 0 | 2 | |
Surgery | 367 (42%) | 67 (26%) | 300 (49%) | <0.001 |
X1st.Course.Chemotherapy.Summ | 615 (72%) | 197 (77%) | 418 (70%) | 0.034 |
Unknown | 11 | 3 | 8 | |
Radiation | 364 (42%) | 146 (56%) | 218 (36%) | <0.001 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence; Fisher's exact test
|
DTLocallyAdvanced %>%
tbl_summary(
by = Era,
digits = all_continuous() ~ 2,) %>%
add_p(pvalue_fun = ~style_pvalue(.x, digits = 2))%>%
bold_p() %>%
add_overall() %>%
modify_header(label ~ "**Variable**") %>%
modify_spanning_header(c("stat_1", "stat_2") ~ "**Demographic Table Locally Advanced Era1 vs Era2*") %>%
bold_labels()
## There was an error in 'add_p()' for variable 'Histo.Behavior.ICD.O.3', p-value omitted:
## Error in stats::fisher.test(data[[variable]], as.factor(data[[by]])): FEXACT error 7(location). LDSTP=18540 is too small for this problem,
## (pastp=17.9441, ipn_0:=ipoin[itp=89]=5918, stp[ipn_0]=17.9929).
## Increase workspace or consider using 'simulate.p.value=TRUE'
## There was an error in 'add_p()' for variable 'AJCC.Clinical.Stage.Group', p-value omitted:
## Error in stats::chisq.test(data[[variable]], as.factor(data[[by]])): 'x' and 'y' must have at least 2 levels
Variable | Overall, N = 5591 | *Demographic Table Locally Advanced Era1 vs Era2 | p-value2 | |
---|---|---|---|---|
Era1, N = 2021 | Era2, N = 3571 | |||
Age.at.Diagnosis | 70.00 (61.50, 77.00) | 70.00 (61.00, 78.00) | 70.00 (62.00, 77.00) | 0.93 |
Sex | 0.41 | |||
1 Male | 280 (50%) | 96 (48%) | 184 (52%) | |
2 Female | 279 (50%) | 106 (52%) | 173 (48%) | |
Race.1 | >0.99 | |||
Non-White | 7 (1.3%) | 2 (1.0%) | 5 (1.4%) | |
White | 552 (99%) | 200 (99%) | 352 (99%) | |
Primary.Payer.at.DX | 0.015 | |||
Insured | 476 (94%) | 170 (96%) | 306 (92%) | |
Medicaid | 25 (4.9%) | 3 (1.7%) | 22 (6.6%) | |
Uninsured | 7 (1.4%) | 4 (2.3%) | 3 (0.9%) | |
Unknown | 51 | 25 | 26 | |
Marital.Status.at.DX | 0.056 | |||
Divorced/Separated | 54 (10%) | 16 (8.3%) | 38 (11%) | |
Married | 335 (62%) | 127 (66%) | 208 (60%) | |
Single | 65 (12%) | 15 (7.8%) | 50 (15%) | |
Widowed | 83 (15%) | 35 (18%) | 48 (14%) | |
Unknown | 22 | 9 | 13 | |
Histo.Behavior.ICD.O.3 | ||||
80003 Neoplasm, malignant | 1 (0.2%) | 1 (0.5%) | 0 (0%) | |
80103 Carcinoma, NOS | 9 (1.7%) | 7 (3.5%) | 2 (0.6%) | |
80213 Carcinoma, anaplastic, NOS | 1 (0.2%) | 1 (0.5%) | 0 (0%) | |
80463 Non-small cell carcinoma | 3 (0.6%) | 3 (1.5%) | 0 (0%) | |
81403 Adenocarcinoma, NOS | 451 (84%) | 175 (88%) | 276 (82%) | |
81443 Adenocarcinoma, intestinal type | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
82443 Carcinoid and adenocarcinoma, combined | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
82553 Adenocarcinoma with mixed subtypes | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
84803 Mucinous adenocarcinoma | 6 (1.1%) | 4 (2.0%) | 2 (0.6%) | |
84803 Mucinous carcinoma | 2 (0.4%) | 0 (0%) | 2 (0.6%) | |
84803 Mucous adenocarcinoma | 1 (0.2%) | 0 (0%) | 1 (0.3%) | |
85003 Duct adenocarcinoma, NOS | 17 (3.2%) | 4 (2.0%) | 13 (3.9%) | |
85003 Ductal carcinoma, NOS | 14 (2.6%) | 0 (0%) | 14 (4.2%) | |
85003 Infiltrating duct adenocarcinoma | 9 (1.7%) | 1 (0.5%) | 8 (2.4%) | |
85003 Infiltrating duct carcinoma, NOS | 11 (2.1%) | 2 (1.0%) | 9 (2.7%) | |
85213 Infiltrating ductular carcinoma | 6 (1.1%) | 0 (0%) | 6 (1.8%) | |
85603 Adenosquamous carcinoma | 1 (0.2%) | 1 (0.5%) | 0 (0%) | |
Unknown | 24 | 3 | 21 | |
AJCC.Clinical.Stage.Group | ||||
LocallyAdvanced | 559 (100%) | 202 (100%) | 357 (100%) | |
Vital.Status | <0.001 | |||
0 Dead | 468 (84%) | 197 (98%) | 271 (76%) | |
1 Alive | 91 (16%) | 5 (2.5%) | 86 (24%) | |
MonthDate | 10.00 (5.00, 19.00) | 9.00 (5.00, 15.00) | 10.00 (4.00, 21.00) | 0.62 |
Surgery | 191 (34%) | 41 (20%) | 150 (42%) | <0.001 |
X1st.Course.Chemotherapy.Summ | 412 (75%) | 162 (81%) | 250 (71%) | 0.011 |
Unknown | 9 | 3 | 6 | |
Radiation | 255 (46%) | 120 (59%) | 135 (38%) | <0.001 |
1
Statistics presented: Median (IQR); n (%)
2
Statistical tests performed: Wilcoxon rank-sum test; chi-square test of independence; Fisher's exact test
|
SurvivalLocalData <-
LocalDataSetDT %>%
select(Age.at.Diagnosis, Sex, Race.1, Era, AJCC.Clinical.Stage.Group, Marital.Status.at.DX, Primary.Payer.at.DX, Vital.Status, MonthDate, Surgery, X1st.Course.Chemotherapy.Summ, Radiation)
SurvivalLocalData <-
SurvivalLocalData %>%
mutate(SurvivalLocalData, Age = ifelse(Age.at.Diagnosis >= 85, "85+",
ifelse(Age.at.Diagnosis >= 75, "75-84",
ifelse(Age.at.Diagnosis >= 65, "65-74",
ifelse(Age.at.Diagnosis >=0, "0-65", NA)))))
ORLocalData <-
SurvivalLocalData %>%
select(Age, Sex, Race.1, Era, AJCC.Clinical.Stage.Group, Marital.Status.at.DX, Primary.Payer.at.DX, Vital.Status, MonthDate, Surgery, X1st.Course.Chemotherapy.Summ, Radiation)
#####Logistic Regression Ensure that Era is labeled as 1= Era2 and 0=Era1
ORLocalData$Era[ORLocalData$Era == "Era2"] <- 1
ORLocalData$Era[ORLocalData$Era == "Era1"] <- 0
table(ORLocalData$Era)
##
## 0 1
## 562 1010
#####Survival Analysis Ensure that vital status is labeled as 1= Alive and 2=Death
SurvivalLocalData$Vital.Status[SurvivalLocalData$Vital.Status == "0 Dead"] <- 2
SurvivalLocalData$Vital.Status[SurvivalLocalData$Vital.Status == "1 Alive"] <- 1
SurvivalLocalData$Vital.Status <- as.numeric(SurvivalLocalData$Vital.Status)
SurvivalLocalData$MonthDate <- as.numeric(SurvivalLocalData$MonthDate)
ORLocalData$Era <- as.numeric(ORLocalData$Era)
ORLocalDataStage4 <-
subset(ORLocalData, AJCC.Clinical.Stage.Group == "Stage4")
ORLocalized <-
subset(ORLocalData, AJCC.Clinical.Stage.Group == "LocallyAdvanced" | AJCC.Clinical.Stage.Group == "EminentlyResectable")
ORLocallyAdvanced <-
subset(ORLocalData, AJCC.Clinical.Stage.Group == "LocallyAdvanced")
OREminentlyResectable <-
subset(ORLocalData, AJCC.Clinical.Stage.Group == "EminentlyResectable")
ORSurgery <-
subset(ORLocalData, Surgery == "Yes")
ORSurgery$AJCC.Clinical.Stage.Group[ORSurgery$AJCC.Clinical.Stage.Group == "Stage4"] <- NA
SurvivalLocalDataStage4 <-
subset(SurvivalLocalData, AJCC.Clinical.Stage.Group == "Stage4")
SurvivalLocalized <-
subset(SurvivalLocalData, AJCC.Clinical.Stage.Group == "LocallyAdvanced" | AJCC.Clinical.Stage.Group == "EminentlyResectable")
SurvivalLocallyAdvanced <-
subset(SurvivalLocalData, AJCC.Clinical.Stage.Group == "LocallyAdvanced")
SurvivalEminentlyResectable <-
subset(SurvivalLocalData, AJCC.Clinical.Stage.Group == "EminentlyResectable")
SurvivalSurgery <-
subset(SurvivalLocalData, Surgery == "Yes")
SurvivalSurgery$AJCC.Clinical.Stage.Group[SurvivalSurgery$AJCC.Clinical.Stage.Group == "Stage4"] <- NA
UVEveryoneOR <- ORLocalData %>%
select(Primary.Payer.at.DX, Marital.Status.at.DX, AJCC.Clinical.Stage.Group, Surgery, Radiation, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis Everyone
MVOREveryoneOR <-
glm(Era ~ Primary.Payer.at.DX + AJCC.Clinical.Stage.Group + Surgery + Radiation,
data = ORLocalData,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableEveryoneOR <-
tbl_regression(MVOREveryoneOR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVEveryoneOR, MVORTableEveryoneOR),
tab_spanner = c("All Patients, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | All Patients, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Primary.Payer.at.DX | 1,411 | ||||||
Insured | — | — | — | — | |||
Medicaid | 1.82 | 1.07, 3.25 | 0.033 | 2.70 | 1.31, 6.30 | 0.012 | |
Uninsured | 0.60 | 0.28, 1.33 | 0.20 | 0.70 | 0.29, 1.70 | 0.41 | |
Marital.Status.at.DX | 1,494 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.78 | 0.55, 1.10 | 0.16 | ||||
Single | 1.46 | 0.92, 2.34 | 0.11 | ||||
Widowed | 0.75 | 0.49, 1.14 | 0.18 | ||||
AJCC.Clinical.Stage.Group | 1,350 | ||||||
EminentlyResectable | — | — | — | — | |||
LocallyAdvanced | 0.40 | 0.28, 0.56 | <0.001 | 0.43 | 0.29, 0.63 | <0.001 | |
Stage4 | 0.42 | 0.29, 0.58 | <0.001 | 0.41 | 0.26, 0.61 | <0.001 | |
Surgery | 1,572 | ||||||
No | — | — | — | — | |||
Yes | 2.02 | 1.60, 2.55 | <0.001 | 2.78 | 2.00, 3.92 | <0.001 | |
Radiation | 1,572 | ||||||
No | — | — | — | — | |||
Yes | 0.59 | 0.47, 0.74 | <0.001 | 0.38 | 0.28, 0.51 | <0.001 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
UVLocalizedOR <- ORLocalized %>%
select(Primary.Payer.at.DX, Marital.Status.at.DX, AJCC.Clinical.Stage.Group, Surgery, Radiation, X1st.Course.Chemotherapy.Summ, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis Localized
MVORLocalizedOR <-
glm(Era ~ Primary.Payer.at.DX + Marital.Status.at.DX + AJCC.Clinical.Stage.Group + X1st.Course.Chemotherapy.Summ + Surgery + Radiation,
data = ORLocalized,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableLocalizedOR <-
tbl_regression(MVORLocalizedOR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVLocalizedOR, MVORTableLocalizedOR),
tab_spanner = c("Localized, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Localized, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Primary.Payer.at.DX | 791 | ||||||
Insured | — | — | — | — | |||
Medicaid | 2.86 | 1.21, 8.41 | 0.030 | 2.08 | 0.81, 6.44 | 0.16 | |
Uninsured | 0.40 | 0.09, 1.69 | 0.19 | 0.31 | 0.06, 1.46 | 0.13 | |
Marital.Status.at.DX | 834 | ||||||
Divorced/Separated | — | — | — | — | |||
Married | 0.57 | 0.32, 0.98 | 0.049 | 0.52 | 0.25, 0.99 | 0.058 | |
Single | 1.29 | 0.62, 2.68 | 0.50 | 0.95 | 0.39, 2.26 | 0.91 | |
Widowed | 0.55 | 0.29, 1.01 | 0.059 | 0.49 | 0.22, 1.03 | 0.067 | |
AJCC.Clinical.Stage.Group | 868 | ||||||
EminentlyResectable | — | — | — | — | |||
LocallyAdvanced | 0.40 | 0.28, 0.56 | <0.001 | 0.43 | 0.29, 0.64 | <0.001 | |
Surgery | 868 | ||||||
No | — | — | — | — | |||
Yes | 2.78 | 2.03, 3.85 | <0.001 | 2.85 | 1.95, 4.23 | <0.001 | |
Radiation | 868 | ||||||
No | — | — | — | — | |||
Yes | 0.43 | 0.32, 0.58 | <0.001 | 0.40 | 0.26, 0.60 | <0.001 | |
X1st.Course.Chemotherapy.Summ | 857 | ||||||
No | — | — | — | — | |||
Yes | 0.68 | 0.48, 0.96 | 0.028 | 1.02 | 0.63, 1.65 | 0.94 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
UVEminentlyOR <- OREminentlyResectable %>%
select(Age, Marital.Status.at.DX, Surgery, Radiation, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis Eminentlyresectable
MVOREminentlyOR <-
glm(Era ~ Age + Surgery + Radiation,
data = OREminentlyResectable,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableEminentlyOR <-
tbl_regression(MVOREminentlyOR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVEminentlyOR, MVORTableEminentlyOR),
tab_spanner = c("Eminently Resectable, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Eminently Resectable, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Age | 309 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.11 | 0.53, 2.34 | 0.78 | 1.19 | 0.56, 2.55 | 0.65 | |
75-84 | 0.83 | 0.39, 1.79 | 0.63 | 0.95 | 0.42, 2.15 | 0.89 | |
85+ | 0.49 | 0.19, 1.35 | 0.15 | 0.58 | 0.20, 1.72 | 0.31 | |
Marital.Status.at.DX | 297 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.26 | 0.04, 0.94 | 0.078 | ||||
Single | 0.83 | 0.10, 5.36 | 0.85 | ||||
Widowed | 0.29 | 0.04, 1.17 | 0.12 | ||||
Surgery | 309 | ||||||
No | — | — | — | — | |||
Yes | 1.75 | 0.98, 3.15 | 0.057 | 1.65 | 0.87, 3.16 | 0.13 | |
Radiation | 309 | ||||||
No | — | — | — | — | |||
Yes | 0.59 | 0.33, 1.05 | 0.072 | 0.52 | 0.29, 0.96 | 0.034 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
UVLocallyAdvancedOR <- ORLocallyAdvanced %>%
select(Primary.Payer.at.DX, Marital.Status.at.DX, Surgery, X1st.Course.Chemotherapy.Summ, Radiation, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis Locally Advanced
MVORLocallyAdvnacedOR <-
glm(Era ~ Primary.Payer.at.DX + Surgery + X1st.Course.Chemotherapy.Summ + Radiation,
data = ORLocallyAdvanced,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableLocallyAdvancedOR <-
tbl_regression(MVORLocallyAdvnacedOR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVLocallyAdvancedOR, MVORTableLocallyAdvancedOR),
tab_spanner = c("Locally Advanced, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Locally Advanced, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Primary.Payer.at.DX | 508 | ||||||
Insured | — | — | — | — | |||
Medicaid | 4.07 | 1.39, 17.4 | 0.024 | 3.80 | 1.23, 16.8 | 0.038 | |
Uninsured | 0.42 | 0.08, 1.91 | 0.26 | 0.31 | 0.06, 1.56 | 0.15 | |
Marital.Status.at.DX | 537 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.69 | 0.36, 1.27 | 0.24 | ||||
Single | 1.40 | 0.62, 3.22 | 0.42 | ||||
Widowed | 0.58 | 0.27, 1.18 | 0.14 | ||||
Surgery | 559 | ||||||
No | — | — | — | — | |||
Yes | 2.85 | 1.92, 4.29 | <0.001 | 3.74 | 2.39, 6.00 | <0.001 | |
X1st.Course.Chemotherapy.Summ | 550 | ||||||
No | — | — | — | — | |||
Yes | 0.57 | 0.37, 0.86 | 0.009 | 0.90 | 0.52, 1.54 | 0.70 | |
Radiation | 559 | ||||||
No | — | — | — | — | |||
Yes | 0.42 | 0.29, 0.59 | <0.001 | 0.36 | 0.22, 0.57 | <0.001 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
UVSurgeryOR <- ORSurgery %>%
select(Primary.Payer.at.DX, Marital.Status.at.DX, AJCC.Clinical.Stage.Group, Radiation, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis Surgery
MVORSurgeryOR <-
glm(Era ~ Primary.Payer.at.DX + AJCC.Clinical.Stage.Group + Radiation,
data = ORSurgery,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableSurgeryOR <-
tbl_regression(MVORSurgeryOR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVSurgeryOR, MVORTableSurgeryOR),
tab_spanner = c("Surgery, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Surgery, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Primary.Payer.at.DX | 469 | ||||||
Insured | — | — | — | — | |||
Medicaid | 0.97 | 0.44, 2.36 | 0.95 | 1.88 | 0.51, 12.1 | 0.41 | |
Uninsured | 0.20 | 0.03, 1.22 | 0.080 | 0.21 | 0.02, 1.90 | 0.14 | |
Marital.Status.at.DX | 491 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.82 | 0.41, 1.53 | 0.54 | ||||
Single | 1.64 | 0.69, 3.95 | 0.26 | ||||
Widowed | 1.24 | 0.50, 3.18 | 0.65 | ||||
AJCC.Clinical.Stage.Group | 367 | ||||||
EminentlyResectable | — | — | — | — | |||
LocallyAdvanced | 0.63 | 0.37, 1.08 | 0.10 | 0.68 | 0.36, 1.25 | 0.22 | |
Radiation | 515 | ||||||
No | — | — | — | — | |||
Yes | 0.53 | 0.35, 0.78 | 0.002 | 0.34 | 0.18, 0.63 | <0.001 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
UVStage4OR <- ORLocalDataStage4 %>%
select(Primary.Payer.at.DX, Radiation, Era) %>%
tbl_uvregression(
method = glm,
y = Era,
method.args = list(family = binomial),
exponentiate = TRUE,
pvalue_fun = ~style_pvalue(.x, digits = 2)
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
####Multivariant analysis serious complications
MVORStage4OR <-
glm(Era ~ Primary.Payer.at.DX + Radiation,
data = ORLocalDataStage4,
family = binomial("logit"),
na.action =na.omit)
###continue on to merge the table sets
MVORTableORStage4 <-
tbl_regression(MVORStage4OR, exponentiate = T,
pvalue_fun = ~style_pvalue(.x, digits = 2),
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
tbl_merge(
list(UVStage4OR, MVORTableORStage4),
tab_spanner = c("Stage 4, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Stage 4, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | OR1 | 95% CI1 | p-value | OR1 | 95% CI1 | p-value | |
Primary.Payer.at.DX | 427 | ||||||
Insured | — | — | — | — | |||
Medicaid | 2.91 | 0.96, 12.6 | 0.093 | 2.86 | 0.93, 12.5 | 0.10 | |
Uninsured | 0.77 | 0.27, 2.34 | 0.63 | 0.95 | 0.32, 3.01 | 0.93 | |
Radiation | 482 | ||||||
No | — | — | — | — | |||
Yes | 0.41 | 0.21, 0.80 | 0.009 | 0.34 | 0.17, 0.70 | 0.003 | |
1
OR = Odds Ratio, CI = Confidence Interval
|
### Univariant Survival Neoadj
UVSurvEveryone <-
SurvivalLocalData %>%
select(Age, Sex, Race.1, Era, AJCC.Clinical.Stage.Group, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Multivariant survival Neoadj
MVSurvEveryone <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Primary.Payer.at.DX + Era + AJCC.Clinical.Stage.Group + Marital.Status.at.DX,
data = SurvivalLocalData) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvEveryone, MVSurvEveryone),
tab_spanner = c("Everyone,**Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Everyone,Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 1,568 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.24 | 1.09, 1.43 | 0.002 | 1.35 | 1.14, 1.61 | <0.001 | |
75-84 | 1.71 | 1.48, 1.97 | <0.001 | 1.87 | 1.55, 2.25 | <0.001 | |
85+ | 2.90 | 2.35, 3.58 | <0.001 | 2.96 | 2.25, 3.89 | <0.001 | |
Sex | 1,568 | ||||||
1 Male | — | — | |||||
2 Female | 1.03 | 0.92, 1.15 | 0.6 | ||||
Race.1 | 1,568 | ||||||
Non-White | — | — | |||||
White | 0.74 | 0.45, 1.21 | 0.2 | ||||
Era | 1,568 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.74 | 0.67, 0.83 | <0.001 | 0.79 | 0.69, 0.91 | <0.001 | |
AJCC.Clinical.Stage.Group | 1,348 | ||||||
EminentlyResectable | — | — | — | — | |||
LocallyAdvanced | 1.62 | 1.37, 1.91 | <0.001 | 1.57 | 1.31, 1.87 | <0.001 | |
Stage4 | 3.59 | 3.02, 4.26 | <0.001 | 3.92 | 3.25, 4.74 | <0.001 | |
Primary.Payer.at.DX | 1,408 | ||||||
Insured | — | — | — | — | |||
Medicaid | 0.67 | 0.51, 0.88 | 0.004 | 0.99 | 0.72, 1.37 | >0.9 | |
Uninsured | 1.55 | 1.02, 2.34 | 0.039 | 1.34 | 0.86, 2.10 | 0.2 | |
Marital.Status.at.DX | 1,492 | ||||||
Divorced/Separated | — | — | — | — | |||
Married | 0.91 | 0.76, 1.10 | 0.3 | 0.95 | 0.77, 1.17 | 0.6 | |
Single | 0.86 | 0.68, 1.09 | 0.2 | 0.97 | 0.74, 1.28 | 0.8 | |
Widowed | 1.40 | 1.12, 1.74 | 0.003 | 1.14 | 0.88, 1.48 | 0.3 | |
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalData)
##
## 8 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Era=Era1 562 536 8 7 9
## Era=Era2 1006 746 10 9 11
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalData)
##
## 8 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Age=0-65 533 410 13 11 14
## Age=65-74 521 418 10 8 11
## Age=75-84 389 343 7 6 8
## Age=85+ 125 111 3 2 4
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalData)
##
## 8 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 811 668 9 8 10
## Sex=2 Female 757 614 9 8 10
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalData)
##
## 8 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 20 16 4.5 3 27
## Race.1=White 1548 1266 9.0 9 10
survfit(Surv(MonthDate, Vital.Status) ~ AJCC.Clinical.Stage.Group, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ AJCC.Clinical.Stage.Group,
## data = SurvivalLocalData)
##
## 228 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## AJCC.Clinical.Stage.Group=EminentlyResectable 307 201 18 15 24
## AJCC.Clinical.Stage.Group=LocallyAdvanced 559 468 10 9 12
## AJCC.Clinical.Stage.Group=Stage4 482 440 4 3 5
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalLocalData)
##
## 84 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 169 137 8 6 10
## Marital.Status.at.DX=Married 908 751 10 9 11
## Marital.Status.at.DX=Single 181 135 11 8 14
## Marital.Status.at.DX=Widowed 234 199 6 5 8
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalLocalData)
##
## 168 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 1306 1065 9 8 10
## Primary.Payer.at.DX=Medicaid 76 55 13 8 26
## Primary.Payer.at.DX=Uninsured 26 23 3 2 13
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalLocalData)
ggsurvplot(fit, data = SurvivalLocalData, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalLocalData, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,200), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
### Univariant Survival Neoadj
UVSurvStage4 <-
SurvivalLocalDataStage4 %>%
select(Age, Sex, Race.1, Era, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Multivariant survival Neoadj
MVSurvStage4 <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Sex + Primary.Payer.at.DX + Era,
data = SurvivalLocalDataStage4) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvStage4, MVSurvStage4),
tab_spanner = c("Stage4, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Stage4, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 482 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.36 | 1.08, 1.70 | 0.008 | 1.41 | 1.09, 1.83 | 0.009 | |
75-84 | 1.64 | 1.27, 2.11 | <0.001 | 1.88 | 1.41, 2.51 | <0.001 | |
85+ | 3.29 | 2.22, 4.89 | <0.001 | 3.50 | 2.28, 5.38 | <0.001 | |
Sex | 482 | ||||||
1 Male | — | — | — | — | |||
2 Female | 1.02 | 0.84, 1.23 | 0.8 | 0.88 | 0.71, 1.08 | 0.2 | |
Race.1 | 482 | ||||||
Non-White | — | — | |||||
White | 0.46 | 0.20, 1.03 | 0.058 | ||||
Era | 482 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.87 | 0.72, 1.06 | 0.2 | 0.87 | 0.71, 1.08 | 0.2 | |
Primary.Payer.at.DX | 427 | ||||||
Insured | — | — | — | — | |||
Medicaid | 0.62 | 0.37, 1.03 | 0.066 | 0.88 | 0.52, 1.51 | 0.7 | |
Uninsured | 0.98 | 0.57, 1.67 | >0.9 | 1.27 | 0.73, 2.22 | 0.4 | |
Marital.Status.at.DX | 454 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.93 | 0.70, 1.24 | 0.6 | ||||
Single | 0.93 | 0.63, 1.38 | 0.7 | ||||
Widowed | 1.42 | 0.99, 2.05 | 0.060 | ||||
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalDataStage4)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalDataStage4)
##
## n events median 0.95LCL 0.95UCL
## Era=Era1 170 168 4 3 5
## Era=Era2 312 272 4 3 5
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalDataStage4)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalDataStage4)
##
## n events median 0.95LCL 0.95UCL
## Age=0-65 175 158 6 5 8
## Age=65-74 163 150 4 3 5
## Age=75-84 110 101 3 2 4
## Age=85+ 34 31 2 1 3
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalDataStage4)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalDataStage4)
##
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 271 248 4 3 5
## Sex=2 Female 211 192 4 3 5
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalData)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalData)
##
## 8 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 20 16 4.5 3 27
## Race.1=White 1548 1266 9.0 9 10
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalLocalDataStage4)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalLocalDataStage4)
##
## 28 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 65 56 3 2 5
## Marital.Status.at.DX=Married 275 252 5 4 6
## Marital.Status.at.DX=Single 51 48 3 2 7
## Marital.Status.at.DX=Widowed 63 60 2 2 3
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalLocalDataStage4)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalLocalDataStage4)
##
## 55 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 392 359 4 3 5
## Primary.Payer.at.DX=Medicaid 20 16 7 2 14
## Primary.Payer.at.DX=Uninsured 15 14 3 2 NA
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalLocalDataStage4)
ggsurvplot(fit, data = SurvivalLocalDataStage4, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalLocalDataStage4, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,200), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
### Univariant Survival Neoadj
UVSurvLocalized <-
SurvivalLocalized %>%
select(Age, Sex, Race.1, Era, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Multivariant survival Neoadj
MVSurvLocalized <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Marital.Status.at.DX + Era,
data = SurvivalLocalized) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvLocalized, MVSurvLocalized),
tab_spanner = c("Localized, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Localized, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 866 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.27 | 1.05, 1.54 | 0.016 | 1.29 | 1.06, 1.58 | 0.012 | |
75-84 | 1.91 | 1.57, 2.33 | <0.001 | 1.86 | 1.51, 2.30 | <0.001 | |
85+ | 3.00 | 2.24, 4.02 | <0.001 | 2.51 | 1.80, 3.49 | <0.001 | |
Sex | 866 | ||||||
1 Male | — | — | |||||
2 Female | 1.02 | 0.87, 1.18 | 0.8 | ||||
Race.1 | 866 | ||||||
Non-White | — | — | |||||
White | 0.89 | 0.42, 1.88 | 0.8 | ||||
Era | 866 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.66 | 0.56, 0.77 | <0.001 | 0.69 | 0.58, 0.81 | <0.001 | |
Primary.Payer.at.DX | 789 | ||||||
Insured | — | — | |||||
Medicaid | 0.77 | 0.54, 1.12 | 0.2 | ||||
Uninsured | 1.24 | 0.59, 2.61 | 0.6 | ||||
Marital.Status.at.DX | 833 | ||||||
Divorced/Separated | — | — | — | — | |||
Married | 1.00 | 0.77, 1.30 | >0.9 | 0.86 | 0.66, 1.12 | 0.3 | |
Single | 0.84 | 0.60, 1.19 | 0.3 | 0.89 | 0.63, 1.26 | 0.5 | |
Widowed | 1.51 | 1.11, 2.06 | 0.009 | 1.00 | 0.72, 1.39 | >0.9 | |
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocalized)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Era=Era1 259 249 10 9 11
## Era=Era2 607 420 15 13 16
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocalized)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Age=0-65 283 198 17 15 21
## Age=65-74 286 214 14 12 16
## Age=75-84 229 198 9 8 10
## Age=85+ 68 59 5 3 9
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocalized)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 426 337 13 11 15
## Sex=2 Female 440 332 12 10 14
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocalized)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 10 7 9 5 NA
## Race.1=White 856 662 12 11 14
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalLocalized)
##
## 35 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 84 64 13 10 19
## Marital.Status.at.DX=Married 508 401 14 12 15
## Marital.Status.at.DX=Single 103 67 17 13 21
## Marital.Status.at.DX=Widowed 138 111 9 7 10
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalLocalized)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalLocalized)
##
## 79 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 740 567 12.0 11 14
## Primary.Payer.at.DX=Medicaid 41 30 19.0 10 34
## Primary.Payer.at.DX=Uninsured 8 7 14.5 1 NA
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalLocalized)
ggsurvplot(fit, data = SurvivalLocalized, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalLocalized, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,150), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
### Univariant Survival Neoadj
UVSurvLocallyAdvanced <-
SurvivalLocallyAdvanced %>%
select(Age, Sex, Race.1, Era, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Multivariant survival Neoadj
MVSurvLocallyAdvanced <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Marital.Status.at.DX + Era,
data = SurvivalLocallyAdvanced) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvLocallyAdvanced, MVSurvLocallyAdvanced),
tab_spanner = c("Locally Advanced, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Locally Advanced, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 559 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.18 | 0.94, 1.49 | 0.2 | 1.21 | 0.95, 1.53 | 0.12 | |
75-84 | 1.69 | 1.34, 2.14 | <0.001 | 1.59 | 1.23, 2.05 | <0.001 | |
85+ | 3.01 | 2.10, 4.32 | <0.001 | 2.33 | 1.57, 3.46 | <0.001 | |
Sex | 559 | ||||||
1 Male | — | — | |||||
2 Female | 1.10 | 0.92, 1.32 | 0.3 | ||||
Race.1 | 559 | ||||||
Non-White | — | — | |||||
White | 0.80 | 0.36, 1.80 | 0.6 | ||||
Era | 559 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.70 | 0.58, 0.84 | <0.001 | 0.71 | 0.59, 0.86 | <0.001 | |
Primary.Payer.at.DX | 508 | ||||||
Insured | — | — | |||||
Medicaid | 0.74 | 0.47, 1.16 | 0.2 | ||||
Uninsured | 1.36 | 0.64, 2.87 | 0.4 | ||||
Marital.Status.at.DX | 537 | ||||||
Divorced/Separated | — | — | — | — | |||
Married | 0.92 | 0.67, 1.27 | 0.6 | 0.83 | 0.60, 1.15 | 0.3 | |
Single | 0.93 | 0.62, 1.40 | 0.7 | 0.98 | 0.64, 1.48 | >0.9 | |
Widowed | 1.73 | 1.19, 2.53 | 0.004 | 1.22 | 0.81, 1.84 | 0.3 | |
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalLocallyAdvanced)
##
## n events median 0.95LCL 0.95UCL
## Era=Era1 202 197 10 9 11
## Era=Era2 357 271 12 10 15
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalLocallyAdvanced)
##
## n events median 0.95LCL 0.95UCL
## Age=0-65 178 142 15 12 17
## Age=65-74 186 149 11 9 14
## Age=75-84 154 139 8 7 10
## Age=85+ 41 38 3 2 9
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalLocallyAdvanced)
##
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 280 237 11 10 14
## Sex=2 Female 279 231 10 9 11
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalLocallyAdvanced)
##
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 7 6 9 3 NA
## Race.1=White 552 462 10 9 12
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalLocallyAdvanced)
##
## 22 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 54 44 10 8 14
## Marital.Status.at.DX=Married 335 287 12 10 14
## Marital.Status.at.DX=Single 65 49 10 7 18
## Marital.Status.at.DX=Widowed 83 71 7 5 9
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalLocallyAdvanced)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalLocallyAdvanced)
##
## 51 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 476 396 10 9 12
## Primary.Payer.at.DX=Medicaid 25 20 13 6 45
## Primary.Payer.at.DX=Uninsured 7 7 9 1 NA
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalLocallyAdvanced)
ggsurvplot(fit, data = SurvivalLocallyAdvanced, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalLocallyAdvanced, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,150), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
### Univariant Survival Neoadj
UVSurvEminentlyResectable <-
SurvivalEminentlyResectable %>%
select(Age, Sex, Race.1, Era, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
## Warning: Problem with `mutate()` input `model`.
## x Loglik converged before variable 2 ; coefficient may be infinite.
## ℹ Input `model` is `map(...)`.
## Warning in fitter(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 2 ; coefficient may be infinite.
###Multivariant survival Neoadj
MVSurvEminentlyResectable <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Marital.Status.at.DX + Era,
data = SurvivalEminentlyResectable) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvEminentlyResectable, MVSurvEminentlyResectable),
tab_spanner = c("Eminently Resectable, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Eminently Resectable, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 307 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.46 | 1.02, 2.09 | 0.038 | 1.53 | 1.05, 2.25 | 0.028 | |
75-84 | 2.39 | 1.65, 3.44 | <0.001 | 2.50 | 1.69, 3.72 | <0.001 | |
85+ | 3.43 | 2.07, 5.70 | <0.001 | 3.68 | 2.01, 6.75 | <0.001 | |
Sex | 307 | ||||||
1 Male | — | — | |||||
2 Female | 0.91 | 0.69, 1.20 | 0.5 | ||||
Race.1 | 307 | ||||||
Non-White | — | — | |||||
White | 1.71 | 0.24, 12.2 | 0.6 | ||||
Era | 307 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.72 | 0.52, 0.99 | 0.042 | 0.88 | 0.63, 1.23 | 0.4 | |
Primary.Payer.at.DX | 281 | ||||||
Insured | — | — | |||||
Medicaid | 0.84 | 0.44, 1.60 | 0.6 | ||||
Uninsured | 0.00 | 0.00, Inf | >0.9 | ||||
Marital.Status.at.DX | 296 | ||||||
Divorced/Separated | — | — | — | — | |||
Married | 1.09 | 0.68, 1.76 | 0.7 | 0.91 | 0.56, 1.47 | 0.7 | |
Single | 0.70 | 0.37, 1.32 | 0.3 | 0.76 | 0.40, 1.44 | 0.4 | |
Widowed | 1.43 | 0.83, 2.44 | 0.2 | 0.82 | 0.46, 1.48 | 0.5 | |
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalEminentlyResectable)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Era=Era1 57 52 15 11 24
## Era=Era2 250 149 19 16 26
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalEminentlyResectable)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Age=0-65 105 56 29 23 51
## Age=65-74 100 65 22 15 29
## Age=75-84 75 59 10 9 15
## Age=85+ 27 21 7 4 22
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalEminentlyResectable)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 146 100 16 12 25
## Sex=2 Female 161 101 19 15 29
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalEminentlyResectable)
##
## 2 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 3 1 8 8 NA
## Race.1=White 304 200 18 15 24
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalEminentlyResectable)
##
## 13 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 30 20 22 12 NA
## Marital.Status.at.DX=Married 173 114 18 14 25
## Marital.Status.at.DX=Single 38 18 29 17 NA
## Marital.Status.at.DX=Widowed 55 40 12 9 22
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalEminentlyResectable)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalEminentlyResectable)
##
## 28 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 264 171 17 14 24
## Primary.Payer.at.DX=Medicaid 16 10 19 12 NA
## Primary.Payer.at.DX=Uninsured 1 0 NA NA NA
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalEminentlyResectable)
ggsurvplot(fit, data = SurvivalEminentlyResectable, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalEminentlyResectable, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,150), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
### Univariant Survival Neoadj
UVSurvSurgery <-
SurvivalSurgery %>%
select(Age, Sex, Race.1, Era, AJCC.Clinical.Stage.Group, Primary.Payer.at.DX, Marital.Status.at.DX, Vital.Status, MonthDate) %>%
tbl_uvregression(
method = coxph,
y = Surv(MonthDate, Vital.Status),
exponentiate = TRUE) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Multivariant survival Neoadj
MVSurvSurgery <-
coxph(Surv(MonthDate, Vital.Status) ~ Age + Sex + AJCC.Clinical.Stage.Group + Primary.Payer.at.DX + Era,
data = SurvivalSurgery) %>%
tbl_regression(exponentiate = T
) %>%
bold_p(t = 0.10) %>%
bold_labels() %>%
italicize_levels()
###Merged Neo Univariant and Multivariant
tbl_merge(
list(UVSurvSurgery, MVSurvSurgery),
tab_spanner = c("Surgery, **Univariable**", "**Multivariable**")
) %>%
bold_labels() %>%
italicize_levels()
Characteristic | Surgery, Univariable | Multivariable | |||||
---|---|---|---|---|---|---|---|
N | HR1 | 95% CI1 | p-value | HR1 | 95% CI1 | p-value | |
Age | 514 | ||||||
0-65 | — | — | — | — | |||
65-74 | 1.26 | 0.99, 1.60 | 0.066 | 1.08 | 0.78, 1.50 | 0.6 | |
75-84 | 1.58 | 1.19, 2.09 | 0.001 | 1.39 | 0.96, 2.01 | 0.077 | |
85+ | 2.04 | 0.65, 6.40 | 0.2 | 1.66 | 0.40, 6.86 | 0.5 | |
Sex | 514 | ||||||
1 Male | — | — | — | — | |||
2 Female | 1.23 | 0.99, 1.52 | 0.062 | 1.08 | 0.82, 1.43 | 0.6 | |
Race.1 | 514 | ||||||
Non-White | — | — | |||||
White | 0.60 | 0.28, 1.27 | 0.2 | ||||
Era | 514 | ||||||
Era1 | — | — | — | — | |||
Era2 | 0.81 | 0.64, 1.02 | 0.075 | 0.76 | 0.55, 1.05 | 0.10 | |
AJCC.Clinical.Stage.Group | 366 | ||||||
EminentlyResectable | — | — | — | — | |||
LocallyAdvanced | 1.41 | 1.08, 1.83 | 0.010 | 1.37 | 1.04, 1.81 | 0.026 | |
Primary.Payer.at.DX | 468 | ||||||
Insured | — | — | — | — | |||
Medicaid | 0.60 | 0.38, 0.96 | 0.034 | 0.77 | 0.43, 1.40 | 0.4 | |
Uninsured | 1.19 | 0.44, 3.19 | 0.7 | 1.04 | 0.32, 3.31 | >0.9 | |
Marital.Status.at.DX | 491 | ||||||
Divorced/Separated | — | — | |||||
Married | 0.96 | 0.68, 1.35 | 0.8 | ||||
Single | 0.82 | 0.53, 1.27 | 0.4 | ||||
Widowed | 1.36 | 0.86, 2.14 | 0.2 | ||||
1
HR = Hazard Ratio, CI = Confidence Interval
|
survfit(Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Era, data = SurvivalSurgery)
##
## 1 observation deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Era=Era1 131 114 21 16 26
## Era=Era2 383 228 26 21 30
survfit(Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Age, data = SurvivalSurgery)
##
## 1 observation deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Age=0-65 228 137 28 24 35
## Age=65-74 187 126 24 19 28
## Age=75-84 94 76 16 13 22
## Age=85+ 5 3 9 4 NA
survfit(Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Sex, data = SurvivalSurgery)
##
## 1 observation deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Sex=1 Male 270 177 26 23 30
## Sex=2 Female 244 165 20 18 26
survfit(Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Race.1, data = SurvivalSurgery)
##
## 1 observation deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Race.1=Non-White 11 7 13 8 NA
## Race.1=White 503 335 24 21 27
survfit(Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Marital.Status.at.DX,
## data = SurvivalSurgery)
##
## 24 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Marital.Status.at.DX=Divorced/Separated 58 40 21 14 35
## Marital.Status.at.DX=Married 310 214 24 20 27
## Marital.Status.at.DX=Single 74 39 29 21 38
## Marital.Status.at.DX=Widowed 49 35 16 12 32
survfit(Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX, data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ Primary.Payer.at.DX,
## data = SurvivalSurgery)
##
## 47 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## Primary.Payer.at.DX=Insured 429 288 22 19 27
## Primary.Payer.at.DX=Medicaid 34 19 32 26 NA
## Primary.Payer.at.DX=Uninsured 5 4 25 20 NA
survfit(Surv(MonthDate, Vital.Status) ~ AJCC.Clinical.Stage.Group , data = SurvivalSurgery)
## Call: survfit(formula = Surv(MonthDate, Vital.Status) ~ AJCC.Clinical.Stage.Group,
## data = SurvivalSurgery)
##
## 149 observations deleted due to missingness
## n events median 0.95LCL 0.95UCL
## AJCC.Clinical.Stage.Group=EminentlyResectable 175 98 31 26 38
## AJCC.Clinical.Stage.Group=LocallyAdvanced 191 136 21 18 28
fit <- survfit(Surv(MonthDate, Vital.Status) ~ Era,
data = SurvivalSurgery)
ggsurvplot(fit, data = SurvivalSurgery, risk.table = TRUE)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.
ggsurvplot(
fit, # survfit object with calculated statistics.
data = SurvivalSurgery, # data used to fit survival curves.
risk.table = TRUE, # show risk table.
pval = TRUE, # show p-value of log-rank test.
conf.int = TRUE, # show confidence intervals for
# point estimaes of survival curves.
xlim = c(0,200), # present narrower X axis, but not affect
# survival estimates.
break.time.by = 25, # break X axis in time intervals by 500.
ggtheme = theme_minimal(), # customize plot and risk table with a theme.
risk.table.y.text.col = T, # colour risk table text annotations.
risk.table.y.text = FALSE # show bars instead of names in text annotations
# in legend of risk table
)
## Warning: Vectorized input to `element_text()` is not officially supported.
## Results may be unexpected or may change in future versions of ggplot2.