[R-sig-Geo] Spatial analysis question

Tomislav Hengl hengl at spatial-analyst.net
Tue Nov 3 10:43:38 CET 2009


Marcelo,

Surprisingly, I could not find any function in the spatstat package (or splancs package) that
specifically derives cross-correlations between multiple point processes:

> data(lansing)
> plot(split(lansing))  # distribution of occurrence records for five+1 species;
> plot(density(split(lansing)), ribbon = FALSE)
# fit stationary marked Poisson process with different intensity for each species:
> lansing.ppm <- ppm(lansing, ~marks, Poisson())
> summary(lansing.ppm)

...but this does not say anything about which species are most correlated (and which are negatively
correlated). See also "Mark correlation function" in PART V. MARKED POINT PATTERNS:

Baddeley, A., 2008. Analysing spatial point patterns in R. CSIRO, Canberra, Australia.
http://www.csiro.au/files/files/pn0y.pdf 


I guess that there is no reason NOT to do what you suggest:

> dens.lansing <- density(split(lansing))
> dens.lansing.sp <- as(dens.lansing[[1]], "SpatialGridDataFrame")
> names(dens.lansing.sp)[1] <- names(dens.lansing)[1]
> for(i in 2:length(dens.lansing)) {
  dens.lansing.sp at data[names(dens.lansing)[i]] <- as(dens.lansing[[i]], "SpatialGridDataFrame")$v
}
> spplot(dens.lansing.sp, col.regions=grey(rev(seq(0,1,0.025))))
> round(cor(log1p(dens.lansing.sp at data[names(dens.lansing)]), use="complete.obs"), 2)
         blackoak hickory maple  misc redoak whiteoak
blackoak     1.00    0.55 -0.73 -0.64  -0.51     0.23
hickory      0.55    1.00 -0.84 -0.63  -0.52    -0.27
maple       -0.73   -0.84  1.00  0.75   0.50    -0.09
misc        -0.64   -0.63  0.75  1.00   0.70     0.09
redoak      -0.51   -0.52  0.50  0.70   1.00     0.25
whiteoak     0.23   -0.27 -0.09  0.09   0.25     1.00

# PCA:
> sp.formula <- as.formula(paste("~", paste("log1p(", names(dens.lansing), ")", collapse="+"),
sep=""))
> PCA.sp <- prcomp(sp.formula, scale=TRUE, dens.lansing.sp at data)
> biplot(PCA.sp, arrow.len=0.1, xlabs=rep(".", length(PCA.sp$x[,1])), main="PCA biplot",
ylabs=names(dens.lansing))

which clearly shows that the most positively correlated species are "hickory" and "blackoak", while
the most 'competing' species are "maple"/"redoak" and "hickory".


HTH

T. Hengl
http://home.medewerker.uva.nl/t.hengl/ 

> -----Original Message-----
> From: r-sig-geo-bounces at stat.math.ethz.ch [mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf
> Of Marcelo Tognelli
> Sent: Friday, October 30, 2009 7:50 PM
> To: r-sig-geo at stat.math.ethz.ch
> Subject: [R-sig-Geo] Spatial analysis question
> 
> Dear List,
> 
> I have probability maps of the distribution of 4 species of venomous snakes
> (raster files output from species distribution modeling software) and point
> locality data with information on snake bite events (most of them without
> the id of the species involved in the accident). I would like to run an
> analysis to see what species correlates best with snake bite events. My idea
> is to generate a kernel density raster from the point event data and then do
> some kind of spatial correlation against the species distribution maps.
> I would greatly appreciate any suggestions on the type of analysis that I
> can perform with these data and on the software and/or R package to run it.
> 
> Thanks in advance,
> 
> Marcelo
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list