[R-sig-Geo] spatially clustered factors?

Chris Mcowen chrismcowen at gmail.com
Mon Jul 1 13:44:10 CEST 2013


Great thanks it worked a treat; a lot of time in R being pointed to the
correct package / function is all that is needed.

Chris 

-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no] 
Sent: 01 July 2013 12:12
To: Chris Mcowen
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] spatially clustered factors?

On Mon, 1 Jul 2013, Chris Mcowen wrote:

> Dear list, first let me apologise, i am an ecologist and this is my 
> first foray into spatial statistics.
>
>
>
> I have, for a number of regions, the factor that best explains 
> variation in the yield (fisheries catch) obtained within that region, 
> the factor has 4 levels - ChlA, SST, Effort or none.

See joincount.test for single comparisons, or joincount.multi for multiple
comparisons by join "colours" in spdep. You'll also need neighbour lists,
explained in:

vignette("nb")

in the most recent version of that package.

Hope this helps,

Roger

>
>
>
> What i am essentially wanting to know is,  is there a spatial pattern 
> to the data? (clumped, over-dispersed or random)
>
>
>
> For example if region 1 is classed as Effort, is it more or less 
> likely that the adjoining region (region 2) will be of the same 
> factor, or does it makes no difference.
>
>
>
> I have seen lots of packages that allow this to be done for numerical 
> data but have not found one for factors.
>
>
>
> Please see below for an example of the data. Where latitude is the 
> centroid of the region and factor is the source of variation.
>
>
>
> clusters <- structure(list(Latitude = c(4.8261, 26.127123, 3.409063, 
> -31.964573, 11.524328, 10.857926, 30.95066, 6.322733, 40.963009, 
> -4.370738, 53.77057, -46.270909, 51.431808, 50.091992, -12.606217, 
> 16.26404, -27.513126, -40.976427, -40.491914, -35.169487, -16.739053, 
> -22.651113, 30.445027, -27.701939, -17.154608, -10.147356, -29.117245, 
> 57.472215, 45.538569, 65.31731, 75.308501, 54.063299, 45.194528, 
> 41.079154, -35.169487, 51.431808, 24.647845, 68.201714, 41.262656, 
> 24.976371, 33.251908, 16.347456, 30.95066, -1.408364, 37.054319, 
> 23.843305, 57.400753, 8.712258), Factor = structure(c(1L, 1L, 1L, 1L, 
> 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
> 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 
> 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("ChlA", "Effort", 
> "SST", "Unidentified"), class = "factor")), .Names = c("Latitude",
>
> "Factor"), class = "data.frame", row.names = c(NA, -48L))
>
>
>
>
>
> Thanks,
>
>
>
> Chris
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

--
Roger Bivand
Department of Economics, NHH Norwegian School of Economics, 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