[R] Cox ridge regression

Terry Therneau therneau at mayo.edu
Mon Aug 3 16:20:42 CEST 2009

>Question 1. Consider the following example from help(ridge):

> fit1 <- coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1), 

>As I understand, this builds a model in which `rx' is the predictor,
>whereas ridge penalty term contains variables `age' and
>`ph.ecog'. Could someone explain what it me...

  The ridge term introduces age as a predictor AND penalizes it.  The model 
above has 3 predictors,  2 of them penalized.
  Later in the post you have a model with both age and ridge(age).  This puts 
age in the model twice, once as a free parameter and once as a penalized one.  
Not surprisingly, the second ends up with a coefficient of 0 (within machine 
precision of zero).   The warning message you got about NaN is likely related to 
this, that there are redundant terms in the model.
  	Terry Therneau

More information about the R-help mailing list