This page describes associations between demographic data and time-to-flare. Sex and IMD are not covered here as they are covered in the controlled variables section
The page describing demographic variables in a descriptive manner can be found here.
Warning: `gather_()` was deprecated in tidyr 1.2.0.
ℹ Please use `gather()` instead.
ℹ The deprecated feature was likely used in the survminer package.
Please report the issue at <https://github.com/kassambara/survminer/issues>.
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
# Generate survival plot and run Cox model for objective flareanalysis_result<-run_survival_analysis( data =flare.cd.df, var_name ="Age", outcome_time ="hardflare_time", outcome_event ="hardflare", legend_title ="Age", plot_base_path ="plots/cd/hard-flare/demographics/age", break_time_by =500)# Extract hazard ratio for Age (continuous variable)fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+Age+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.cd.df)cd.hard.forest<-rbind(cd.hard.forest, get_HR(fit.me, "Age"))# Display plot and model summaryknitr::include_graphics("plots/cd/hard-flare/demographics/age.png")
# Generate survival plot and run Cox model for objective flareanalysis_result<-run_survival_analysis( data =flare.uc.df, var_name ="Age", outcome_time ="hardflare_time", outcome_event ="hardflare", legend_title ="Age", plot_base_path ="plots/uc/hard-flare/demographics/age", break_time_by =500)# Extract hazard ratio for Age (continuous variable)fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+Age+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.uc.df)uc.hard.forest<-rbind(uc.hard.forest, get_HR(fit.me, "Age"))# Display plot and model summaryknitr::include_graphics("plots/uc/hard-flare/demographics/age.png")
p<-generate_survival_plot( data =flare.cd.df, formula =Surv(softflare_time, softflare)~BMIcat, legend_title ="BMI", legend_labs =c("Underweight", "Normal", "Overweight", "Obese"), palette =c("#1A8FE3", "#E76D83", "#5FB49C", "#FED766"), xlab ="Time from study recruitment (days)", title ="Time to clinical flare", break_time_by =200, plot_path ="plots/cd/soft-flare/demographics/bmi")knitr::include_graphics("plots/cd/soft-flare/demographics/bmi.png")
Code
fit.me<-coxph(Surv(softflare_time, softflare)~Sex+IMD+cat+BMI+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.cd.df)cd.clin.forest<-rbind(cd.clin.forest,get_HR(fit.me, c("BMI")))invisible(cox_summary(fit.me))
Cox model summary:
Variable
HR
Lower 95%
Upper 95%
P-value
SexFemale
2.1473
1.6736
2.7550
0.0000
IMD2
0.8998
0.5671
1.4279
0.6542
IMD3
0.8895
0.5555
1.4243
0.6258
IMD4
0.9343
0.5951
1.4667
0.7676
IMD5
0.9772
0.6332
1.5081
0.9171
catFC 50-250
1.5540
1.1972
2.0170
0.0009
catFC > 250
2.2569
1.6787
3.0342
0.0000
BMI
1.0122
0.9911
1.0337
0.2594
Proportional hazards assumption test
Chi-squared statistic
DF
P-value
Sex
0.1734
0.9925
0.6740
IMD
6.5777
3.9477
0.1556
cat
1.5900
1.9797
0.4468
BMI
2.3144
0.9900
0.1265
GLOBAL
10.2401
14.8159
0.7941
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
Code
p<-generate_survival_plot( data =flare.cd.df, formula =Surv(hardflare_time, hardflare)~BMIcat, legend_title ="BMI", legend_labs =c("Underweight", "Normal", "Overweight", "Obese"), palette =c("#1A8FE3", "#E76D83", "#5FB49C", "#FED766"), xlab ="Time from study recruitment (days)", title ="Time to objective flare", break_time_by =500, plot_path ="plots/cd/hard-flare/demographics/bmi")knitr::include_graphics("plots/cd/hard-flare/demographics/bmi.png")
Code
fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+BMI+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.cd.df)cd.hard.forest<-rbind(cd.hard.forest,get_HR(fit.me, c("BMI")))invisible(cox_summary(fit.me))
Cox model summary:
Variable
HR
Lower 95%
Upper 95%
P-value
SexFemale
1.5011
1.1295
1.9950
0.0051
IMD2
0.9513
0.5451
1.6599
0.8604
IMD3
0.9658
0.5454
1.7103
0.9050
IMD4
0.8451
0.4830
1.4788
0.5556
IMD5
0.9334
0.5478
1.5906
0.8001
catFC 50-250
2.0103
1.4508
2.7857
0.0000
catFC > 250
3.1451
2.1945
4.5074
0.0000
BMI
1.0200
0.9949
1.0456
0.1187
Proportional hazards assumption test
Chi-squared statistic
DF
P-value
Sex
0.8263
0.9880
0.3591
IMD
3.6654
3.9453
0.4448
cat
7.2453
1.9854
0.0263
BMI
3.8299
0.9886
0.0495
GLOBAL
15.1563
17.4781
0.6169
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
p<-generate_survival_plot( data =flare.uc.df, formula =Surv(softflare_time, softflare)~BMIcat, legend_title ="BMI", legend_labs =c("Underweight", "Normal", "Overweight", "Obese"), palette =c("#1A8FE3", "#E76D83", "#5FB49C", "#FED766"), xlab ="Time from study recruitment (days)", title ="Time to clinical flare", break_time_by =200, plot_path ="plots/uc/soft-flare/demographics/bmi")knitr::include_graphics("plots/uc/soft-flare/demographics/bmi.png")
Code
fit.me<-coxph(Surv(softflare_time, softflare)~Sex+IMD+cat+BMI+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.uc.df)uc.clin.forest<-rbind(uc.clin.forest,get_HR(fit.me, c("BMI")))invisible(cox_summary(fit.me))
Cox model summary:
Variable
HR
Lower 95%
Upper 95%
P-value
SexFemale
1.5667
1.2601
1.9478
0.0001
IMD2
1.2357
0.7747
1.9711
0.3743
IMD3
1.0037
0.6340
1.5890
0.9873
IMD4
1.4156
0.9159
2.1878
0.1177
IMD5
1.1137
0.7241
1.7128
0.6240
catFC 50-250
1.6181
1.2586
2.0803
0.0002
catFC > 250
2.1566
1.6473
2.8235
0.0000
BMI
0.9686
0.9481
0.9896
0.0035
Proportional hazards assumption test
Chi-squared statistic
DF
P-value
Sex
1.3437
0.9904
0.2438
IMD
3.8474
3.9456
0.4189
cat
4.7128
1.9726
0.0925
BMI
0.4838
0.9851
0.4807
GLOBAL
10.4559
17.3504
0.8958
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
Code
p<-generate_survival_plot( data =flare.uc.df, formula =Surv(hardflare_time, hardflare)~BMIcat, legend_title ="BMI", legend_labs =c("Underweight", "Normal", "Overweight", "Obese"), palette =c("#1A8FE3", "#E76D83", "#5FB49C", "#FED766"), xlab ="Time from study recruitment (days)", title ="Time to objective flare", break_time_by =500, plot_path ="plots/uc/hard-flare/demographics/bmi")knitr::include_graphics("plots/uc/hard-flare/demographics/bmi.png")
Code
fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+BMI+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.uc.df)uc.hard.forest<-rbind(uc.hard.forest,get_HR(fit.me, "BMI"))invisible(cox_summary(fit.me))
Cox model summary:
Variable
HR
Lower 95%
Upper 95%
P-value
SexFemale
1.3542
1.0359
1.7703
0.0265
IMD2
1.4226
0.7804
2.5931
0.2499
IMD3
1.3567
0.7598
2.4225
0.3024
IMD4
1.7491
0.9986
3.0636
0.0506
IMD5
1.2764
0.7316
2.2270
0.3902
catFC 50-250
2.0568
1.4948
2.8299
0.0000
catFC > 250
3.2137
2.3058
4.4790
0.0000
BMI
0.9808
0.9558
1.0065
0.1415
Proportional hazards assumption test
Chi-squared statistic
DF
P-value
Sex
0.1486
0.9850
0.6938
IMD
2.5015
3.9358
0.6345
cat
3.5648
1.9672
0.1640
BMI
0.1512
0.9853
0.6915
GLOBAL
6.9035
22.4944
0.9993
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
fit.me<-coxph(Surv(softflare_time, softflare)~Sex+IMD+cat+`IBD Duration`+BMI+Treatment+Age+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.cd.df)invisible(cox_summary(fit.me))
Cox model summary:
Variable
HR
Lower 95%
Upper 95%
P-value
SexFemale
2.1585
1.6671
2.7947
0.0000
IMD2
0.8389
0.5280
1.3326
0.4569
IMD3
0.8199
0.5074
1.3247
0.4172
IMD4
0.8984
0.5702
1.4156
0.6442
IMD5
0.9268
0.5991
1.4337
0.7327
catFC 50-250
1.4944
1.1441
1.9521
0.0032
catFC > 250
2.1836
1.6127
2.9566
0.0000
IBD Duration
0.9942
0.9829
1.0056
0.3152
BMI
1.0040
0.9821
1.0264
0.7231
TreatmentMono biologic
0.9820
0.6903
1.3971
0.9197
TreatmentCombo therapy
0.7083
0.4599
1.0909
0.1175
Treatment5-ASA
1.3322
0.7502
2.3657
0.3276
TreatmentNone reported
0.9726
0.7007
1.3502
0.8683
Age
1.0046
0.9957
1.0136
0.3112
Proportional hazards assumption test
Chi-squared statistic
DF
P-value
Sex
0.4811
0.9924
0.4849
IMD
5.6223
3.9577
0.2246
cat
1.4933
1.9842
0.4702
IBD Duration
3.5316
0.9957
0.0598
BMI
2.1568
0.9913
0.1404
Treatment
3.4530
3.9163
0.4721
Age
2.1438
0.9913
0.1416
GLOBAL
18.1663
18.5875
0.4840
`geom_smooth()` using formula = 'y ~ x'
`geom_smooth()` using formula = 'y ~ x'
Objective flare
Code
fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+`IBD Duration`+BMI+Treatment+Age+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.cd.df)invisible(cox_summary(fit.me))
fit.me<-coxph(Surv(hardflare_time, hardflare)~Sex+IMD+cat+`IBD Duration`+BMI+Treatment+Age+frailty(SiteNo), control =coxph.control(outer.max =20), data =flare.uc.df)invisible(cox_summary(fit.me))