[R] Ridge regression

David Winsemius dwinsemius at comcast.net
Wed Dec 2 17:18:17 CET 2009


On Dec 2, 2009, at 11:04 AM, David Winsemius wrote:

>
> On Dec 2, 2009, at 10:42 AM, Eleni Christodoulou wrote:
>
>> Dear list,
>>
>> I have a couple of questions concerning ridge regression. I am  
>> using the
>> lm.ridge(...) function in order to fit a model to my microarray data.
>> Thus *model=lm.ridge(...)*
>> I retrieve some coefficients and some scales for each gene. First  
>> of all, I
>> would like to ask: the real coefficients of the model are not  
>> included in
>> the first argument of the output but in the result of coef(model),  
>> am I
>> right?
>
> Not exactly. coef(model) extracts the coefficients from the model  
> but the coefficients do in the example instance I created following  
> the help page happen to be in the first element of the model.
>
> eg:
> > long.rr$coef
>         GNP   Unemployed Armed.Forces   Population         Year      
> Employed
>  25.3615288    3.3009416    0.7520553  -11.6992718   -6.5403380     
> 0.7864825
> > long.rr[[1]]
>         GNP   Unemployed Armed.Forces   Population         Year      
> Employed
>  25.3615288    3.3009416    0.7520553  -11.6992718   -6.5403380     
> 0.7864825
>
>> Moreover, what does the scale argument represent? Which is its
>> connection with the coefficients? The R help file os not very  
>> informative
>> for me...
>
> A plausible response to such a question might be that the help page  
> is a sketchy substitute for the MASS book. However, I cannot find  
> ridge regression in the table of contents or in the index of my  
> copy, but I only have ed. 2 and the current edition is the 4th. So  
> we will both need to wait for more knowledgeable (or with more  
> recent editions of MASS) persons to answer that question.

After a bit more searching, I am thinking that the 4th edition may not  
be teh source for answers. It appears that lm.ridge is a worked answer  
to one of hte questions at the back of chapter 6. See p 6 and 24 (in  
the pdf numbering):

http://www.stats.ox.ac.uk/pub/MASS4/VR4ex.pdf

>
> (And "scales" is not an argument, rather it's a returned value.)
>
>>
>> Thank you very much in advance,
>> Eleni Christodoulou
>>
>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
> ______________________________________________
> R-help at 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.

David Winsemius, MD
Heritage Laboratories
West Hartford, CT




More information about the R-help mailing list