Hi all, I have run a ridge regression as follows: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$g+final$u, lambda=seq(0,10,0.01)) Then I enter : select(reg) and it returns: modified HKB estimator is 19.3409 modified L-W estimator is 36.18617 smallest value of GCV at 10 I think it means that it is advisable to use the results of regression corresponding to lambda= 10; so the next thing I do is: reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=10) which yields: final$lag1 final$lag2 final$g final$u 3.147255e-04 1.802505e-01 -4.461005e-02 -1.728046e-09 -5.154932e-04 If I am to use these coefficient values later in my analysis, how do I call them; for clearly reg$final$lag1 does not work. 1> Any way I can access these values? 2> The main issue is that I want to access these coefficient values automatically, i.e. R should run the regression and automatically provide me these values after taking into consideration that lambda which minimizes the GCV. Kindly advise me how I can proceed. Thanks and regards, Preetam -- Preetam Pal (+91)-9432212774 M-Stat 2nd Year, Room No. N-114 Statistics Division, C.V.Raman Hall Indian Statistical Institute, B.H.O.S. Kolkata. [[alternative HTML version deleted]]
?coef There are many introductory texts on R... I recommend getting a few. --------------------------------------------------------------------------- Jeff Newmiller The ..... ..... Go Live... DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/Batteries O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --------------------------------------------------------------------------- Sent from my phone. Please excuse my brevity. Preetam Pal <lordpreetam at gmail.com> wrote:>Hi all, > >I have run a ridge regression as follows: > >reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$g+final$u, >lambda=seq(0,10,0.01)) > >Then I enter : > >select(reg) and it returns: modified HKB estimator is 19.3409 > modified L-W estimator is 36.18617 > smallest value of GCV at 10 > >I think it means that it is advisable to use the results of regression >corresponding to lambda= 10; >so the next thing I do is: > >reg=lm.ridge(final$l~final$lag1+final$lag2+final$g+final$u, lambda=10) > >which yields: > > final$lag1 final$lag2 final$g > final$u > 3.147255e-04 1.802505e-01 -4.461005e-02 -1.728046e-09 -5.154932e-04 > > >If I am to use these coefficient values later in my analysis, how do I >call >them; for clearly reg$final$lag1 does not work. > >1> Any way I can access these values? > >2> The main issue is that I want to access these coefficient values >automatically, i.e. R should run the regression and automatically >provide >me these values after taking into consideration that lambda which >minimizes >the GCV. Kindly advise me how I can proceed. > > >Thanks and regards, >Preetam