Dear all, I need to calculate likelihood ratio test for ridge regression. In February I have reported a bug where coxph returns unpenalized log-likelihood for final beta estimates for ridge coxph regression. In high-dimensional settings ridge regression models usually fail for lower values of lambda. As the result of it, in such settings the ridge regressions have higher values of lambda (e.g. over 100) which means that the difference between unpenalized log-likelihood and penalized log-likelihood is not insignificant. I would be grateful if someone can confirm that the below code is correct workaround.
ridge.penalty <- function(theta,beta) { (theta/2)*sum(beta^2) } a.theta <- 100 fit1 <- coxph(Surv(futime, fustat) ~ ridge(rx,age,ecog.ps,theta=a.theta), data=ovarian) # correct loglikelihood for final beta estimate ridge.loglikelihood.beta <- coxph$loglik[2] - ridge.penalty(a.theta, fit1$coef) Thanks in advance DK [[alternative HTML version deleted]] ______________________________________________ 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.