[R] Robust R^2

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Aug 13 12:24:39 CEST 2004


On Fri, 13 Aug 2004 Carsten.Colombier at efv.admin.ch wrote:

> Do you know if there is any function in R available which calculates an R^2
> for a robust MM-regression?

It's very easy to do, *but* why would you want a non-robust measure for a 
robust fit?

[Just 1 - sum(residuals(fit)^2)/sum((y-mean(y))^2), for suitable y which 
model.extract will give you.  Unless you have no intercept or weights, of 
course.]

Or were you looking for a robust alternative to R^2?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list