1

I am using R 3.3.0, pachage 'spgwr'

I created a spatial points data frame as shown:

points_map <- SpatialPointsDataFrame(data=points_df,coords=cbind(points_df$x,points_df$y))

The original data frame (points_df) has latlong coordinates in decimal degrees.

I did not define any projection information and now the projargs argument for points_map is NA. I used this Spatial Points Data Frame into a GWR bandwidth calculation:

bw = gwr.sel(v1 ~ v2+v3+v4, data=points_map,adapt=F,verbose=TRUE)

It has been running for days and the results so far show two bandwidth estimations:

Bandwidth: 15.97609 CV score: 678473.9 
Bandwidth: 25.82404 CV score: 684589.3 

Because I did not input long-lat coordinates directly, but the Spatial Points Data Frame coordinates with no projection, my question is in which units is the bandwidth?

The function information says that if you use longlat=TRUE, the units are Km, but if you have a SpatialPoints object, longlat=FALSE and the value is taken from the object itself. I would really appreciate your help. Thank you

sorak
  • 2,607
  • 2
  • 16
  • 24
Belen
  • 11
  • 1
  • It's going to be based on the units of the data you passed to SpatialPointsDataFrame. It looks like it converts units only if it knows you're passing longitude and latitude. – De Novo Mar 06 '18 at 23:43
  • Thank you very much for your answer. So, my v1 is Temperature in degrees C and v2 is Elevation in meters. My coordinates are decimal degrees. Do you think my bandwidth may be degrees C? However, 25 degrees would be the whole range of temperatures. Thanks! – Belen Mar 07 '18 at 14:57
  • It is actually Degrees. I run a smaller subset on both options and I figured out that my original bandwidth is in Degrees (goes down to about 0.21), when you do **longlat=TRUE** I got the same result but in Km (23Km) – Belen Mar 15 '18 at 14:04
  • Good work figuring it out! You can actually post that as an answer to your own question, and then mark it as the answer. I'd be happy to upvote it for you as well. – De Novo Mar 15 '18 at 22:37

0 Answers0