Hi,
I am curious if spgwr or some other spatial packages estimate local
variances. I am particularly interested if gwr residuals are locally
siginificant or not. In this case, I believe I should estimate local
variances. I though an alternative to spgwr is gam in mgcv.
Suppose I have xy coordinates and some values d1 and d2 attached to
point(x,y). z1 is related to z2, but this relationship is not spatially
stationary. So I would set this up using gam:
model1 <- gam(d1 ~ s(x, y, by=d2)) : I am not quite familiar with
adaptive bandwidth selections in gam...
or using spgwr
bw <- gwr.sel(d1~d2, coords=cbind(x,y), apapt=T)
model2 <- gwr(d1~d2, coords=cbind(x,y), apapt=T, bandwidth=bw,
hatmatrix=TRUE, lonlat =FALSE)
What I would like to know is
d1(i)-hat{d1(i)}/hat{sigma(i)}
where i denotes the ith location in a map.
I did a bit of search and "lokern" pacakge came up, but this is only for
bivarriate case and not particularly spatial-oriented.
Sorry for ambiguity of my question... I appreciate if someone could
give me some clues.....
thanks
tk
variance estimation in spgwr
2 messages · Takatsugu Kobayashi, Roger Bivand
On Sun, 17 Feb 2008, Takatsugu Kobayashi wrote:
Hi,
I am curious if spgwr or some other spatial packages estimate local
variances. I am particularly interested if gwr residuals are locally
siginificant or not. In this case, I believe I should estimate local
variances. I though an alternative to spgwr is gam in mgcv.
Suppose I have xy coordinates and some values d1 and d2 attached to
point(x,y). z1 is related to z2, but this relationship is not spatially
stationary. So I would set this up using gam:
model1 <- gam(d1 ~ s(x, y, by=d2)) : I am not quite familiar with
adaptive bandwidth selections in gam...
or using spgwr
bw <- gwr.sel(d1~d2, coords=cbind(x,y), apapt=T)
model2 <- gwr(d1~d2, coords=cbind(x,y), apapt=T, bandwidth=bw,
hatmatrix=TRUE, lonlat =FALSE)
What I would like to know is
d1(i)-hat{d1(i)}/hat{sigma(i)}
where i denotes the ith location in a map.
The components for a sigma(i) are not currently returned by .GWR_int(), the workhorse function inside gwr(). The local RSS is calculated to get to the local coefficient of determination, so it could be returned in one form or other (but what would be a sensible residual degrees of freedom?). Whether you should trust the output is a completely different question. If you want to infer, it is perhaps reasonable to look at Bayesian GWR, which would give you a distribution of the local residual, but even so, until the collinearity problem is resolved, caution is still the key thing to keep in focus (in my opinion). Roger
I did a bit of search and "lokern" pacakge came up, but this is only for bivarriate case and not particularly spatial-oriented. Sorry for ambiguity of my question... I appreciate if someone could give me some clues..... thanks tk
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
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