Eric Claus
2012-Nov-29 16:33 UTC
[R] bootstrapped cox regression in rms package (non html!)
Hi, I am trying to convert a colleague from using SPSS to R, but am having trouble generating a result that is similar enough to a bootstrapped cox regression analysis that was run in SPSS. I tried unsuccessfully with bootcens, but have had some success with the bootcov function in the rms package, which at least generates confidence intervals similar to what is observed in SPSS. However, the p-values associated with each predictor in the model are not really close in many instances. Here is the code I am using: formula=Surv(months, recidivate) ~ fac1 + fac2 + fac3 + fac4 + fac5 + fac6 + fac7 + fac8 fit=cph(formula, data=temp, x=T, y=T) validate(fit, method="boot", B=9999, bw=F, type="residual", sls=0.05, aics=0,force=NULL, estimates=TRUE, pr=FALSE) out=bootcov(fit, B=9999, pr=F, coef.reps=T, loglik=F) for (i in 1:8) { print(quantile(out$boot.Coef[,i], c(.025, .975))) } anova(out) variable low CI high CI p-value fac1 -8.919692 20.800878 .5917 fac2 -8.683579 3.091100 .6381 fac3 -1.848428 2.193492 .9312 fac4 -0.17575426 0.08333277 .8246 fac5 -3.1488578 0.5166171 .2946 fac6 -0.03621405 0.07241772 .5600 fac7 -0.62847922 0.08566296 .3433 fac8 -0.01553286 0.20909384 .5756 The results from SPSS I am trying to match (or come close to matching) are the following: variable low CI high CI p-value fac1 -8.474 20.020 .456 fac2 -8.206 3.093 .524 fac3 -1.829 2.087 .900 fac4 -.173 .083 .749 fac5 -2.945 .450 .143 fac6 -.035 .070 .306 fac7 -.626 .092 .189 fac8 -.017 .203 .247 Sorry if this is a really basic question. I have searched for several hours for an explanation, but cannot find anything that explains why the p-values would be different despite similar confidence intervals. Thanks in advance, Eric
Seemingly Similar Threads
- bootstrapped cox regression (rms package)
- surpressing tickmarks / labels x-as for two sets of boxplot (plotted as stacked boxplots)
- page boundaries for latex printing of summary.formula objects in Hmisc
- [JOBS] Start a Ruby side project or company
- How do I compute interactions with anova.mlm ?