0
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Perhaps it would help if you told us what package "ridge" is in. $\endgroup$ – alex Jul 1 '13 at 19:44
  • $\begingroup$ 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. $\endgroup$ – alex Jul 1 '13 at 19:46
  • $\begingroup$ The R package I am using is "survival": stat.ethz.ch/R-manual/R-devel/library/survival/html/ridge.html $\endgroup$ – Jenny Jul 1 '13 at 19:51
1
$\begingroup$

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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.