[R] use of sequence on ridge regression

Rodrigo Briceño rjavierbriceno at gmail.com
Wed May 7 16:51:29 CEST 2008


Dear R users. I have a doubt about the use of the sequence option on
Ridge regression. I'm trying to understand the use of this option when
variables are highly linear correlated. I'm running a model where the
variables HtShoes and Ht have high VIF values. My program is written
below, but I'm not sure about the correct way of using the sequence
option:

library (faraway)
data (seatpos)
attach (seatpos)
spos.mod <- lm(hipcenter ~ .,seatpos) summary (spos.mod)
library(MASS)
lm.ridge(hipcenter ~ .,seatpos)
plot(lm.ridge(hipcenter ~ .,seatpos, lambda = seq(0,0.1,0.001)))
select(lm.ridge(hipcenter ~ ., seatpos,lambda = seq(0,0.1,0.001)))

Any advice will be appreaciated. Rodrigo B.



More information about the R-help mailing list