[R-sig-Geo] Interpretation of gwr output ~ where is the fitted/predicted y?

Roger Bivand Roger.Bivand at nhh.no
Wed Jun 18 06:49:00 CEST 2008


On Tue, 17 Jun 2008, Debarchana Ghosh wrote:

> Hi,
>
> OS: 2.70 R version on Windows with 4 GB Ram
>
> I have created an object of class gwr from the function 'gwr' (package
> spgwr). But cannot find the fitted/predicted y values in the output.
>
> test500.gwr <- gwr(formula = yimp00 ~ english + slope30 + mac95d + mdinc_t +
>
>                      musa00 + popden_t + dissewer + dismcd + diswater +
> ag04 +
>                      c1dishwy + c1dipark + tccost1 + soil1 + soil2, data =
> base500vars,
>                      coords = cbind(base500vars$longx, base500vars$laty),
> bandwidth = test500.bw.aic,
>                      hatmatrix = TRUE, longlat = TRUE, se.fit = TRUE)
>
>> names(test500.gwr)
> [1] "SDF"       "lhat"      "lm"        "results"   "bandwidth" "adapt"
> "hatmatrix" "gweight"   "this.call"**
>
>> names(test500.gwr$SDF)
> [1] "sumw"       "Intercept"  "english"    "slope30"    "mac95d"
> "mdinct"     "musa00"     "popdent"    "dissewer"   "dismcd"     "diswater"
>
> [12] "ag04"       "c1dishwy"   "c1dipark"   "tccost1"    "soil1"
> "soil2"      "R2"         "gwre"       "Interse"    "englishse"  "slope30se"
>
> [23] "mac95dse"   "mdinctse"   "musa00se"   "popdentse"  "dissewerse"
> "dismcdse"   "diswaterse" "ag04se"     "c1dishwyse" "c1diparkse" "tccost1se"
>
> [34] "soil1se"    "soil2se"
>
> I want to clarify whether gwre ( previously it was gwr.e) is the estimated Y
> values?
>

No, gwr.e is (currently) the i'th element of the vector of residuals in 
each GWR (that is for each fit point). On examination, neither it nor the 
R2 has any meaning when the fit points are not identical with the data 
points - I will investigate and patch if need be. If data points are fit 
points, you can, perhaps, use it to get fitted values with the y values 
- as in CV bandwidth selection. What do you need them for?

Hope this helps,

Roger

> Thanks,
> Debs.
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the R-sig-Geo mailing list