[R] r-squared equivalent for locally-smoothed figures?
jfox at mcmaster.ca
Tue Feb 3 23:11:14 CET 2004
Since residuals(mod) works for models fit by locfit(), you could calculate
an analog to R^2 as 1 - (sum(residuals(mod)^2)/sum((y - mean(y))^2). I'm
not sure whether you can get residuals from sm.
I hope that this helps,
At 03:44 PM 2/3/2004 +0000, Stuart Leask wrote:
>Does anyone know a rough equivalent of the r-squared statistic for lines or
>surfaces fitted to data using local smoothing (eg. using the sm or locfit
>libraries)? I feel there must be some manner in which such locally-smoothed
>figures explain a fraction of the total squared error in the data... Can
>such a fraction be obtained from locfit (or sm) objects?
Department of Sociology
email: jfox at mcmaster.ca
More information about the R-help