R: gwr.sel function will not produce output, timing out for no apparent reason

44 Views Asked by At

I am trying to run a GWR, and using the spgwr package. I just want to run a basic GWR on my data, which looks a little like this:

Concentration ws wd eleva traffic dist_to_RR
10382 2 200 30 11234 112.3
43722 2 210 30 24273 2736.3
26374 2 230 60 23846 2163.1

etc. etc.

I've converted my dataset to a SpatialPointDataFrame (from an sf) and double checked that all of my variables are numeric. I am trying to use this spatial dataset to run a gwr, and here is the code I have:

    band_gwr <- gwr.sel(Concentration~ws+wd+eleva+
                 traffic+dist_to_RR, data=dat, 
                 gweight=gwr.Gauss, adapt=TRUE)

I can't even get to the next step because this code will time out. It doesn't throw errors, it just runs infinitely long. I have this running on a computing cluster with a lot of cores, and I let it run for 3+ hours and still nothing. I think something must be wrong with the way I've written this, I can't imagine why else this won't work.

I have already checked variable correlation and removed those with Pearson's >0.8, and I also removed all of the variables with >40% homogeneity. There are no NAs in the data. This is an SpatialPointsDataFrame so it does not need a coords argument in the function.

Any ideas on how to go about debugging this?

Thanks!

0

There are 0 best solutions below