Skip to content
Back to formatted view

Raw Message

Message-ID: <5.0.2.1.0.20040203170615.00af1008@127.0.0.1>
Date: 2004-02-03T22:11:14Z
From: John Fox
Subject: r-squared equivalent for locally-smoothed figures?
In-Reply-To: <004c01c3ea6c$a0fa9490$f2e1f380@OPENZAURUS>

Dear Stuart,

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,
  John

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?
>
>Stuart

____________________________
John Fox
Department of Sociology
McMaster University
email: jfox at mcmaster.ca
web: http://www.socsci.mcmaster.ca/jfox