[R-sig-Geo] analyzing spatial segregation of sexes

Marcelino de la Cruz marcelino.delacruz at upm.es
Thu May 10 11:03:24 CEST 2012


Hi,

with respect to the implementation of the "Bivariate i.e.2-type point 
pattern (see package 'spatstat')" you may do something like this:

library(spatstat)

plants.ppp <- ppp( x = example$x, y =example$y, marks=factor(sex), 
window = yourwindow),

where "example" is a data.frame with your data and  "yourwindow" are 
the boundaries of your study area. See help (ppp) and help (owin) to 
see several ways of specifying the window. If you are impatient and 
have many points you could try this:

plants.ppp <- ppp( x = example$x, y =example$y, marks=factor(sex), 
xrange=range(example$x), yrange = range(example$y))


Asessing segregation in spatstat would imply computing differences of 
univariata and bivariate functions;e.g., to compute the segregation 
of females you should do:

Kff <- Kcross(plants.ppp, i="F", j="F")
Kfm <- Kcross(plants.ppp, i="F", j="M")

D <- eval.fv(Kff-Kfm)

Ploting this function [i.e,  plot(D)] would show you at which scales 
(if any) D > 0 (segregation of female sex) or D < 
0  ("overdispersion" ?of female sex).

By the way, function K1K2 in package ecespa implements test of these 
functions against a null model of random labeling.

HTH,

Marcelino



At 09:27 10/05/2012, Mathieu Rajerison wrote:
>Hi!
>
>Why not use, for example, KCross spatstat function, given two point
>patterns: one for male individuals and one for female ones?
>
>
>2012/5/9 Wall, Wade A ERDC-RDE-CERL-IL <Wade.A.Wall at usace.army.mil>
>
> > Hi all,
> >
> > I have a data set that consists of x,y coordinates for individual plants,
> > along with sex of the individual.
> >
> > Example
> >
> > Ind     sex     x       y
> > 1       F       10      5
> > 2       M       9       4
> > . . .
> > 200     M       20      4
> >
> > for 20 populations of the species. I would like to know if males and
> > females are randomly dispersed, or tend to segregate.
> >
> > I would like to use Philip Dixon's method (1994), and there is an
> > implementation in the R package "spatialsegregation" (dixon(X, prepR=0)).
> > However,
> > I am not very familiar with spatial analyses in R and am not sure how to
> > structure the input object X. The function description says "Bivariate i.e.
> > 2-type point pattern (see package 'spatstat')"
> >
> > Does anyone know how to structure the data that I have (example above) so
> > that I can use dixon()? Thanks for any help.
> >
> > Wade A. Wall
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
>
>         [[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



More information about the R-sig-Geo mailing list