Thank you Terry, that answered all questions.

As a suggestion, help page for ridge() might indicate that the ridge
term simultaneously introduces predictors and penalizes them.

Ljubomir


From: Terry Therneau <thern...@mayo.edu>
To: Ljubomir Buturovic <ljubo...@sfsu.edu>
Cc: r-help@r-project.org
Subject: Re: Cox ridge regression
Date: Mon, 3 Aug 2009 09:20:42 -0500 (CDT)

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

______________________________________________
R-help@r-project.org 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