[R] R-square in robust regression

Mark Difford mark_difford at yahoo.co.uk
Thu Nov 13 18:47:29 CET 2008


Hi Laura,

The fact that you had copied Prof. Ripley's response suggested to me that
this was so. Nevertheless, I think Martin Maechler was wise to emphasize the
problem, just in case.

Bye, Mark.


Laura POggio wrote:
> 
> I am aware of the limits of the parameter R^2 in this case. However often
> it
> is required for many different reasons. And it is helpful to have a
> function
> that does it. The most important is to know the drawback of the"number", I
> think.
> 
> Laura
> 
> 
> 2008/11/13 Martin Maechler <maechler at stat.math.ethz.ch>
> 
>> >>>>> "LP" == Laura Poggio <laura.poggio at gmail.com>
>> >>>>>     on Thu, 13 Nov 2008 10:43:14 +0000 writes:
>>
>>    LP> yes thank you! it is perfect.
>>    LP> I was using lmrob in package robustbase and it did not have that
>> option in
>>    LP> the summary.
>>
>> Yes....
>>
>> lmRob() from "robust" is from a company which -- often being excellent --
>> has at times listened much more to its not-so-professional
>> customers instead of its expert advisors.
>>
>> So, yes indeed, summary(lmRob(..)) happily reports
>> something like
>>  "Multiple R-Squared: 0.620538"  (number: for the stack loss example)
>>
>> But the question is if the customer should get  R^2  even in
>> casses where its definition is very doubtful and indeed
>> somewhat *counter* to the purpose of using methods that are NOT
>> least-squares based....
>>
>> Martin Maechler, ETH Zurich
>>
>>    LP> 2008/11/13 Mark Difford <mark_difford at yahoo.co.uk>
>>
>>    >>
>>    >> Hi Laura,
>>    >>
>>    >> >> I was searching for a way to compute robust R-square in R in
>> order
>> to
>>    >> get
>>    >> >> an
>>    >> >> information similar to the "Proportion of variation in
>> response(s)
>>    >> >> explained
>>    >> >> by model(s)" computed by S-Plus.
>>    >>
>>    >> There are several options. I have had good results using wle.lm()
>> in
>>    >> package
>>    >> wle and lmRob() in package robust. The second option is perhaps
>> closest to
>>    >> what you want.
>>    >>
>>    >> Regards, Mark.
>>    >>
>>    >>
>>    >> Laura POggio wrote:
>>    >> >
>>    >> > I was searching for a way to compute robust R-square in R in
>> order
>> to get
>>    >> > an
>>    >> > information similar to the "Proportion of variation in
>> response(s)
>>    >> > explained
>>    >> > by model(s)" computed by S-Plus. This post is dealing with that.
>> Would be
>>    >> > possible to have some hints on how to calculate this parameter
>> within R?
>>    >> >
>>    >> > Thank you very much in advance.
>>    >> >
>>    >> > Laura Poggio
>>    >> >
>>    >> >
>>    >> >
>>    >>
>> -----------------------------------------------------------------------------
>>    >> > Date: Mon, 20 Oct 2008 06:15:49 +0100 (BST)
>>    >> > From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
>>    >> > Subject: Re: [R] R-square in robust regression
>>    >> > To: PARKERSO <sophie.parker at vuw.ac.nz>
>>    >> > Cc: r-help at r-project.org
>>    >> > Message-ID:
>>    >> >       
>> <alpine.LFD.2.00.0810200609590.21177 at gannet.stats.ox.ac.uk>
>>    >> > Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
>>    >> >
>>    >> > On Sun, 19 Oct 2008, PARKERSO wrote:
>>    >> >
>>    >> >>
>>    >> >> Hi there,
>>    >> >> I have just started using the MASS package in R to run
>> M-estimator
>>    >> robust
>>    >> >> regressions. The final output appears to only give coefficients,
>> degrees
>>    >> > of
>>    >> >> freedom and t-stats. Does anyone know why R doesn't compute R or
>>    >> >> R-squared
>>    >> >
>>    >> > These as only valid for least-squares fits -- they will include
>> the
>>    >> > possible outliers in the measure of fit.
>>    >> >
>>    >> > And BTW, it is not 'R', but the uncredited author of the package
>> who made
>>    >> > such design decisions.
>>    >> >
>>    >> >> and why doesn't give you any other indices of goodness of fit?
>>    >> >
>>    >> > Which ones did you have in mind?  It does give a scale estimate
>> of
>> the
>>    >> > residuals, and this determines the predition accuracy.
>>    >> >
>>    >> >> Does anyone know how to compute these in R?
>>    >> >
>>    >> > Yes.
>>    >> >
>>    >> >> Sophie
>>    >> >
>>    >> >
>>    >> > --
>>    >> > Brian D. Ripley,                  ripley at stats.ox.ac.uk
>>    >> > Professor of Applied Statistics,
>>    >> >
>> http://www.stats.ox.ac.uk/~ripley/<http://www.stats.ox.ac.uk/%7Eripley/>
>> <http://www.stats.ox.ac.uk/%7Eripley/>
>>    >> <http://www.stats.ox.ac.uk/%7Eripley/>
>>    >> > University of Oxford,             Tel:  +44 1865 272861 (self)
>>    >> > 1 South Parks Road,                     +44 1865 272866 (PA)
>>    >> > Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>    >> >
>>    >> >       [[alternative HTML version deleted]]
>>    >> >
>>    >> > ______________________________________________
>>    >> > 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.
>>    >> >
>>    >> >
>>    >>
>>    >> --
>>    >> View this message in context:
>>    >>
>> http://www.nabble.com/Re%3A-R-square-in-robust-regression-tp20478161p20478307.html
>>    >> Sent from the R help mailing list archive at Nabble.com.
>>    >>
>>    >> ______________________________________________
>>    >> 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.
>>    >>
>>
>>     LP> [[alternative HTML version deleted]]
>>
>>    LP> ______________________________________________
>>    LP> R-help at r-project.org mailing list
>>    LP> https://stat.ethz.ch/mailman/listinfo/r-help
>>    LP> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>>    LP> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Re%3A-R-square-in-robust-regression-tp20478161p20485534.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list