When used in a coxph or survreg model formula,
specifies a ridge regression term. The likelihood is penalised by
theta
/2 time the sum of squared coefficients. If scale=T
the penalty is calculated for coefficients based on rescaling the
predictors to have unit variance. If df
is specified then theta
is chosen based on an approximate degrees of freedom.
ridge(..., theta, df=nvar/2, eps=0.1, scale=TRUE)
An object of class coxph.penalty
containing the data and
control functions.
predictors to be ridged
penalty is theta
/2 time sum of squared coefficients
Approximate degrees of freedom
Accuracy required for df
Scale variables before applying penalty?
Gray (1992) "Flexible methods of analysing survival data using splines, with applications to breast cancer prognosis" JASA 87:942--951
coxph
,survreg
,pspline
,frailty
coxph(Surv(futime, fustat) ~ rx + ridge(age, ecog.ps, theta=1),
ovarian)
lfit0 <- survreg(Surv(time, status) ~1, lung)
lfit1 <- survreg(Surv(time, status) ~ age + ridge(ph.ecog, theta=5), lung)
lfit2 <- survreg(Surv(time, status) ~ sex + ridge(age, ph.ecog, theta=1), lung)
lfit3 <- survreg(Surv(time, status) ~ sex + age + ph.ecog, lung)
Run the code above in your browser using DataLab