
Last chance! 50% off unlimited learning
Sale ends in
This is a wrapper function which first selects variables in the Cox
regression model using fastbw
from the rms
package and then
returns a fitted Cox regression model with the selected variables.
selectCox(formula, data, rule = "aic")
A formula object with a Surv
object on the left-hand
side and all the variables on the right-hand side.
Name of an data frame containing all needed variables.
The method for selecting variables. See fastbw
for
details.
This function first calls cph
then fastbw
and finally
cph
again.
Ulla B. Mogensen, Hemant Ishwaran, Thomas A. Gerds (2012). Evaluating Random Forests for Survival Analysis Using Prediction Error Curves. Journal of Statistical Software, 50(11), 1-23. URL http://www.jstatsoft.org/v50/i11/.
# NOT RUN {
library(pec)
library(prodlim)
data(GBSG2)
library(survival)
f <- selectCox(Surv(time,cens)~horTh+age+menostat+tsize+tgrade+pnodes+progrec+estrec ,
data=GBSG2)
# }
Run the code above in your browser using DataLab