Closed DKchenliyuan closed 3 years ago
@DKchenliyuan
Thanks for reporting the issue. What I see here is that you are using a fixed bi-square kernel. We had some internal discussions previously and found that the combinations of fixed-bisquare and adaptive-gaussian sometimes have some fitting issues. So we would suggest to use either adaptive-bisquare or fixed-gaussian kernel. I think the reason is that a fixed-bisquare kernel may contain too few points (plus the weights drop to zero at bandwidth) at some locations when the spatial distribution of the points are very irregular. If you changed to a gaussian kernel, it would run ok. Please see the attached screenshot.
Regarding the bandwidth exceeds the largest pair-wise distance, this is possible and expected when the relationship approaches global. The upper bound of the bandwidth search range in mgwr
and GWmodel
may be different. Here we use the twice of the maximum pairwise distance as the upper limit. See this line of code here. That may explain why the bandwidth is mgwr is almost twice of the one reported in the Comber paper (I guess Lex was using GWmodel)?
@Ziqi-Li
Thanks for your comment. It helps me a lot.
An additional question:
I find mgwr
seems to have no functions to directly or conveniently fit the Mixed GWR model (such as gwr.mixed
or gwr.multiscale(...bws0=c(Inf, 100, 100, Inf)...)
in GWmodel
). Is that right?
@DKchenliyuan Yes, the bandwidth cannot be forced to be inf yet. Please see this issue for some discussions #4. It is not something hard to do, so we could probably add this in somewhere in the summer.
I'm closing the issue, if anything else pops up, feel free to reopen it.
Hi! I try to fit a MGWR model based on the data (post-process .shp file in attachment). point_trans.zip
My code is as follow:
First, I notice that the bandwidths of 'ClayPC' and 'NH4Ngkg' (both 7484.08m) exceed the maximum distance (3742.06m) between observation points. These two bandwidths were both 3741.7m in the existing study (see Analyst A in Comber et al. 2020). I don't know if this bias is caused by my mistake. It seems that it happens when the bandwidth tends to be global.
Besides, I get the following error message when the model fitting:
There are 689 observation points in the data, but what does 'kth(=972)' mean? How can I deal with this problem?
Any comments on this greatly appreciated.