Hi
I’m working on a large dataset of patients looking at what factors might affect poor performance. One outcome I looked at was survival (from the point the data was collected. I ended up fitting a weibull AFT model which seems to be ok (I"m not a statistician but the model seems to fit better than Cox PH)
There are so many ways to present it and R seems to have so many functions (psm, surfit(survplot) , weibreg etc.) I was wondering what the best way to present this data if I was publishing or presenting it
?as Hazard ration
?with Survival plots
This is what my model looks like when I used PSM
psm(formula = Surv(timey, event == “Died”) ~ iF1d + iF3 + FI.1 + **
** alone + helper + Age + Gender + Ethnicity1_Name, data = df_first, **
** dist = “weibull”)
** Model Likelihood Discrimination **
** Ratio Test Indexes **
** Obs 119230 LR chi2 19655.02 R2 0.163 **
** Events 65781 d.f. 15 Dxy 0.329 **
** sigma 1.130828 Pr(> chi2) <0.0001 g 0.709 **
** gr 2.032 **
** Coef S.E. Wald Z Pr(>|Z|)**
** (Intercept) 6.2438 0.0628 99.40 <0.0001 **
** iF1d=1 0.1664 0.0115 14.49 <0.0001 **
** iF3=1 0.0715 0.0144 4.97 <0.0001 **
** iF3=2 0.1400 0.0134 10.44 <0.0001 **
** iF3=3 0.1798 0.0148 12.13 <0.0001 **
** FI.1 -0.3738 0.0036 -104.94 <0.0001 **
** alone=1 -0.1072 0.0124 -8.64 <0.0001 **
** helper=1 0.0814 0.0179 4.55 <0.0001 **
** Age -0.0398 0.0006 -62.41 <0.0001 **
** Gender=M -0.4446 0.0092 -48.53 <0.0001 **
** Ethnicity1_Name=European -0.4584 0.0320 -14.33 <0.0001 **
** Ethnicity1_Name=Maori -0.5810 0.0369 -15.74 <0.0001 **
** Ethnicity1_Name=Middle Eastern/Latin American/African 0.1368 0.0935 1.46 0.1432 **
** Ethnicity1_Name=Other Ethnicity -0.1063 0.0749 -1.42 0.1559 **
** Ethnicity1_Name=Pacific Peoples -0.1664 0.0419 -3.98 <0.0001 **
** Ethnicity1_Name=Residual Categories -0.4763 0.1994 -2.39 0.0169 **
** Log(scale) 0.1230 0.0034 36.54 <0.0001**
I used the method described here (https://stackoverflow.com/questions/9151591/how-to-plot-the-survival-curve-generated-by-survreg-package-survival-of-r/9167030#9167030) to plot survival plots
df_new1<data.frame(iF1d=as.factor(rep(0,1)),iF3=as.factor(rep(0,1)),FI.1=1,alone=as.factor(rep(0,1)),helper=as.factor(rep(0,1)),Age=rep(mean(df_first$Age),1),Gender=rep(‘F’,1),Ethnicity1_Name=rep(‘European’,1))
df_new2<-data.frame(iF1d=as.factor(rep(1,1)),iF3=as.factor(rep(0,1)),FI.1=1,alone=as.factor(rep(0,1)),helper=as.factor(rep(0,1)),Age=rep(mean(df_first$Age),1),Gender=rep(‘F’,1),Ethnicity1_Name=rep(‘European’,1))
lines(predict(fit_weib, newdata=df_new1,type=“quantile”,p=seq(.01,.99,by=.01)),seq(.99,.01,by=-.01),col=“red”)
lines(predict(fit_weib, newdata=df_new2,type=“quantile”,p=seq(.01,.99,by=.01)),seq(.99,.01,by=-.01),col=“green”)