# Survival analysis with ridge regression in R give same results with different random seeds

I am doing survival analysis using ridge regression. I'm using this R command:

coxph(Surv(time, status) ~ ridge(x1, x2, x3), data=DATA)


As far as I know, lambda (the regulation parameter) is estimated using cross validation, but then this R code should result in different results with different random seeds. But I got always the same coefficients; how can that happen?

Is coxph(Surv()~.) not a commonly used approach? Should I use glmnet or any other functions?

• Perhaps it would help if you told us what package "ridge" is in. – alex Jul 1 '13 at 19:44
• Not knowing the above, one hypothesis is that the lambda sequence is a deterministic function of the entire data set. So no matter how data is randomly allocated into the cross-validation sets, the same optimal lambda is chosen. Then the model is refit using that lambda on the entire data set. – alex Jul 1 '13 at 19:46
• The R package I am using is "survival": stat.ethz.ch/R-manual/R-devel/library/survival/html/ridge.html – Jenny Jul 1 '13 at 19:51

## 1 Answer

The documentation you linked combined with the method signature indicates that one chooses either theta, or it is chosen for you as a function of df. If the latter is not specified, then it defaults to half the number of variables.

As far as I can tell, no cross-validation is occurring. Why do you think that it is?