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

Roger Bivand Roger.Bivand at nhh.no
Thu Jun 19 05:30:47 CEST 2008


On Wed, 18 Jun 2008, Debarchana Ghosh wrote:

>>
>>>
>>> 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?
>
>
>
> In the following gwr run, the fit.points are same as the given data points,
> i.e. the gwr regression is fitted on the points "coords =
> cbind(base500vars$longx, base500vars$laty)" , which was passed as an
> argument in the main gwr function and the fit.points argument was not
> specified.
>
> # gwr function
> test500.gwr<-gwr(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), longlat=TRUE,
> bandwidth = test500.bw.aic,
>  hatmatrix=TRUE, se.fit=TRUE, gweight=bisquare)
>
> I did not understand how I can get the estimated y values as in CV bandwidth
> selection.

By arithmetic. If yi = yhati + ei, and you have yi (from the input 
data) and ei (from gwr.e), you can get yhati. I don't know what they give 
you, though, since they are dependent on the choice of kernel and 
bandwidth, as well as the relative arrangement of the data points, so they 
are just one of many possible sets of GWR fitted values.

Roger

PS. The erroneous local R2 and gwr.e where fit points are not data 
points will be removed from the results at the next release and replaced 
by NAs.

>
> Since my data points are same as the fitted points, I want to compare the 1)
> observed Y, 2) estimated Y from the OLS regression (lm object) and 3)
> estimated Y from the GWR regression (from the gwr object)
>
> 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