Datum: Tue, 5 Jan 2010 18:00:50 +0100 (CET)
Von: Roger Bivand <Roger.Bivand at nhh.no>
An: Marco Helbich <marco.helbich at gmx.at>
CC: r-sig-geo at stat.math.ethz.ch
Betreff: Re: [R-sig-Geo] mixed geographically weighted regression
On Tue, 5 Jan 2010, Marco Helbich wrote:
Dear list,
I am trying to fit a mixed geographically weighted regression model
(with adaptive kernel) using the spgwr package, i.e. I want to hold some of the
coefficients fixed at the global level. Thus, I have the following
questions:
1. Which is the most efficient way to estimate such a model?
a) I found the posting
b) The method proposed in Mei et al. (2006, pp. 588-589, see
2. In order to follow this method, I first have to find the kernel
weights at each point. The help-file says that these can be found in the
SpatialPointsDataFrame (SDF), but I could not get it from there. Where
can I extract them?
The sums of weights for each fit point are in the returned object, but
this is not what you (do not) want. The S_v matrix in the paper (eq. 3) is
returned as the hat matrix, I believe. Since you have S_v, you do not need
the W(u_i, v_i) weights (a diagonal matrix for each fit (and data) point
i). Given S_v, the unnumbered equation in the middle of the page gives you
\hat{\beta_c}, doesn't it? I think that I would pre-multiply X_c and Y by
(I - S_v), then use QR methods to complete, if I wanted to proceed with
this.
Because of concerns about how these things are done, and how they are
represented in the literature, I'd look for corrobotation - being able to
reproduce others' published results for example.
Hope this helps,
Roger
We are using such a code:
library(spgwr)
data(georgia)
g.adapt.gauss <- gwr.sel(PctBach ~ TotPop90 + PctRural + PctEld + PctFB
+ PctPov + PctBlack, data=gSRDF, adapt=TRUE)
res.adpt <- gwr(PctBach ~ TotPop90 + PctRural + PctEld + PctFB + PctPov
+ PctBlack, data=gSRDF, adapt=g.adapt.gauss)
res.adpt$SDF
I hope my problem is clear and appreciate every hint! Thank you!
Best regards
Marco
--
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