[R-sig-Geo] how to combine data with shapefile file for GWR

Roger Bivand Roger.Bivand at nhh.no
Tue Oct 20 12:46:55 CEST 2009


On Tue, 20 Oct 2009, Przemek Jura wrote:

> Dear subscribers,I am newbie in geographical analysis (especially in R),
> please be understanding.
> In my analysis I would like to conduct geographically weighted regression.
> The region I analyse has 16 provinces which are defined in shp file (16
> polygons). However, data set (in separate data source) is stratified by
> different variables like: year, gender, age group and of course region what
> gives around 4000 records. Here is my problem: is it possible to  combine
> regions in shp with the region variable in my data set (in both have the
> same names)? When I used spCbind function it takes only first 16 matching
> criteria records form a data set.Is it possible to conduct GWR taking into
> account all the listed variables?

Please think through your research problem carefully. If you have 4000 
observations, but no separate spatial support for them (either 4000 
polygons if say census tracts, or 4000 points if say patients), then you 
can only model this data after aggregation to the 16 provinces. Then you 
have areal spatial support, but for very few aggregate observations, so 
GWR will not get you very far. If you want to use spatial methods on the 
whole data set, you need appropriate spatial support.

Hope this helps,

Roger

> Thank you in advance!
>
>
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list