[R-sig-Geo] quadracount on multitype points
Guy.Bayegnak at gov.ab.ca
Wed Sep 13 16:41:25 CEST 2017
Thanks for all the suggestions. They were all very helpful. The "relrisk" function turned out to be even better than what I was trying to do.
And Ege, no worries about self promotion. I already have a copy of the "spatial point pattern " book.
From: Ege Rubak [mailto:rubak at math.aau.dk]
Sent: September 13, 2017 2:21 AM
To: Guy Bayegnak <Guy.Bayegnak at gov.ab.ca>
Cc: Rolf Turner <r.turner at auckland.ac.nz>; r-sig-geo at r-project.org; Adrian.Baddeley at curtin.edu.au
Subject: Re: [R-sig-Geo] quadracount on multitype points
Maybe your explorative analysis could also benefit from `relrisk` in case you don't know that function?
It basically gives you a list of smooth images (one for each type) of the probability that a hypothetical sample at that location is of a given type. E.g. for the built-in multitype point pattern dataset `lansing` you would do:
prob <- relrisk(lansing, diggle=TRUE)
This example and more (e.g. a division of the sampling area into subsets of dominant types) can be found in Chapter 14 of our "spatstat book" if you need more details (sorry about the shameless self promotion, but I don't know a better source for this :-)).
On 09/13/2017 01:08 AM, Guy Bayegnak wrote:
> Thanks a lot for your response and suggestion Rolf. Yes, by "quadrant" I mean the little sub-windows. My problem is the following:
> We have collected thousands of groundwater samples across a vast area, and analysed them. Based on the analysis we are able to assign a "type" to each water sample. When plotted, there seems to be a spatial trend in water type. But a given area may have more than one water type, usually with a dominant type (most frequently occurring). What I am trying to do is identify the dominant type for each sub-region /sub-windows but show the count side by side, for example:
> y [0,0.801) [0.801,1.6]
> [0.5,1] Off = 36 Off = 6
> On = 3 On = 39
> [0,0.5) Off = 4 Off = 36
> On = 42 On = 6
> I think I can achieve what I am looking for with your suggestion. Once I get the table list, I will copy the numbers side by side manually.
> -----Original Message-----
> From: Rolf Turner [mailto:r.turner at auckland.ac.nz]
> Sent: September 12, 2017 3:45 PM
> To: Guy Bayegnak <Guy.Bayegnak at gov.ab.ca>
> Cc: r-sig-geo at r-project.org; Adrian.Baddeley at curtin.edu.au; Ege Rubak
> <rubak at math.aau.dk>
> Subject: Re: [R-sig-Geo] quadracount on multitype points
> On 13/09/17 02:11, Guy Bayegnak wrote:
>> Dear all,
>> I am working on a multitype point pattern, and I'd like to estimate
>> how many of each type of point occurs into each quadrant. I know it
>> is possible to use the quandracount on split marks as follows using
>> spatstats: quadratcount(split(marks)). But the result produces as
>> many windows as they are marks. I am wondering is there is a way to
>> know many occurrence of each type there is per quadrant and to plot
>> it in a single grid.
> You really should start by mentioning that you are dealing with the spatstat package.
> It's not clear to me what you are after. A minimal reproducible example would be helpful. I presume that by "quadrant" you mean one of the four equal sub-windows formed by bisecting your (rectangular) window vertically and horizontally.
> If my presumption is correct then perhaps
> (where "X" is your point pattern) does what you want. E.g.:
>> y [0,0.801) [0.801,1.6]
>> [0.5,1] 36 36
>> [0,0.5) 34 36
>> y [0,0.801) [0.801,1.6]
>> [0.5,1] 35 39
>> [0,0.5) 42 36
> Is this something like what you wish to achieve?
> Rolf Turner
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
More information about the R-sig-Geo