Dear all,
I developed a cox regression model with three independent factors to predict
overall survival in a specific group of patients. I would like to adjust
this model for overoptimism with the censboot function of the boot package.
I would like to use bootstrapping to adjust the regression coefficients of
this model. However, I am unable to complete all the arguments of the
censboot function after searching for several hours. The error I am not able
to fix in the formula is:
Error in censboot(coxpredictors, mod.coxregr.hub, R = 10, sim = "ordinary")
:
incorrect number of subscripts on matrix
I assume it has something to do with the strata argument, but I am not sure
how to fix that. Furthermore, is "ordinary" simulation the correct type for
this kind of analysis? I hope someone can help me to complete the formula so
I can perform my bootstrap analysis. You can find my entire script below.
Many thanks in advance.
Best regards,
Geert Simkens
FollowUpMonths Event PCI10 N2
Symptoms
Min. : 0.1314 Min. :0.0000 Min. :0.0000 Min. :0.000 Min.
:0.0000
1st Qu.:11.3676 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.000 1st
Qu.:1.0000
Median :19.6797 Median :0.0000 Median :0.0000 Median :0.000 Median
:1.0000
Mean :23.4967 Mean :0.4472 Mean :0.3668 Mean :0.402 Mean
:0.8241
3rd Qu.:32.2135 3rd Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.:1.000 3rd
Qu.:1.0000
Max. :87.1622 Max. :1.0000 Max. :1.0000 Max. :1.000 Max.
:1.0000
time <- FollowUpMonths
event <- Event
X <- cbind(PCI10, N2, Symptoms)
summary(time)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1314 11.3700 19.6800 23.5000 32.2100 87.1600
# cox regression model with dataname first
mod.coxregr.hub = function(coxpredictors)