Skip to content
Prev 3363 / 29559 Next

Exporting the SDF object created in spgwr to ESRI shapefile (shp)

On Tue, 1 Apr 2008, Jay Douillard wrote:

            
Note that gw.cov() is just an (anti)-proof of concept, and likely tells 
you nothing whatsoever, especially with many variables, very much GIGO.
You asked for the local correlation coefficients, you can set cor=FALSE. 
But you still get the covariance pairs. Subset by matching (or grepping) 
on the names of SDF). How many input variables were there, and why?
Why td? Do you really want to write to a temporary directory?

Where is the output of traceback()? Where is the output of summary() of 
your input SpatialPolygonsDataFrame object? Is proj4string(gwls$SDF) as it 
should be? Could you set it for x as input object:

proj4string(gwls$SDF) <- CRS(proj4string(x))

What was proj4string(x), was it as it should be? Did you read with 
readOGR() and was there a *.prj file?
If the input object was x, why not just say

gwls$SDF$n_code <- x$n_code

unless you are using the fp= argument. If you are, there is no match 
anyway, because your fit points and data points differ.

This looks suspiciously like real estate data mining. GWR generally and GW 
local statistics are (very) thin ice and crucially depend on the bandwidth 
and the actual model of the data. Unless you know your data very well, 
they may be very misleading, I'm afraid. If you do know where apparent 
non-stationarity is coming from, it is better to model it properly.

Roger
Inexperience with R/spgwr isn't a problem, but using GWR as a data mining 
tool is a problem. It isn't proven, really.