Skip to content

Cox ridge regression

1 message · Terry Therneau

#
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