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

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

>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

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to