Using the spgwr package I followed this tutorial and found a way to interpolate the result to a raster layer (gwr on pixel/raster data using the meuse data set, further down the script). But the second step is taking hour by hour and I am not sure if R is hanging or if the code is wrong.
Here is what I did until now:
# calculating the bandwidth bw<- gwr.sel(pb_train ~ gesteine + schnee_tag_1 + rs_hospso, data=env.spdf, adapt=FALSE) # running first gwr model fGo<- gwr(pb_train ~ gesteine + schnee_tag_1 + rs_hospso, env.spdf, bandwidth=bw, hatmatrix=TRUE) spplot(fGo$SDF, "pred")
This is where R keeps hanging...
gwr.priclus<- gwr(pb_train ~ gesteine + schnee_tag_1 + rs_hospso, env.spdf, bandwidth=bw, fit.points=env.grid, predict=TRUE, se.fit=TRUE, fittedGWRobject = fGo)
env.spdf is a
SpatialPointsDataFrame with my predictors at each location.
env.grid is a
SpatialPixelsDataFrame that contains the coordinates and the predictor values for the entire study area.
What am I doing wrong here? I would also like to know what exactly happens within the scond step.