MINDEX_SP: The Multipoint Morisita Index for Spatial Patterns

Description Usage Arguments Details Value Author(s) References Examples

View source: R/MINDEX_SP.R

Description

Computes the multipoint Morisita index for spatial patterns (i.e. 2-dimensional patterns).

Usage

1
MINDEX_SP(X, scaleQ=1:5, mMin=2, mMax=5, Wlim_x=NULL, Wlim_y=NULL)

Arguments

X

A N x 2 matrix, data.frame or data.table containing the X and Y coordinates of N data points. The X coordinates must be given in the first column and the Y coordinates in the second column.

scaleQ

Either a single value or a vector. It contains the value(s) of Q^(1/2) chosen by the user where Q is the number of cells (or quadrats) of the 2D grid (by default: scaleQ = 1:5).

mMin

The minimum value of m (by default: mMin = 2).

mMax

The maximum value of m (by default: mMax = 5).

Wlim_x

A vector controlling the spatial extent of the 2D gird along the X axis. It consists of two real values, i.e. Wlim_x <- c(a,b) where b > a (by default: Wlim_x <- c(min(X[,1]),max(X[,1]))).

Wlim_y

A vector controlling the spatial extent of the 2D gird along the Y axis. It consists of two real values, i.e. Wlim_y <- c(a,b) where b > a (by default: Wlim_y <- c(min(X[,2]),max(X[,2]))).

Details

  1. Q^(1/2) is the number of grid cells (or quadrats) along each of the two axes.

  2. Q^(1/2) is directly related to delta (see References).

  3. delta is the diagonal length of the grid cells.

Value

A data.frame containing the value of the m-Morisita index for each value of delta and m.

Author(s)

Jean Golay jeangolay@gmail.com

References

J. Golay, M. Kanevski, C. D. Vega Orozco and M. Leuenberger (2014). The multipoint Morisita index for the analysis of spatial patterns, Physica A 406:191–202.

L. Telesca, J. Golay and M. Kanevski (2015). Morisita-based space-clustering analysis of Swiss seismicity, Physica A 419:40–47.

L. Telesca, M. Lovallo, J. Golay and M. Kanevski (2016). Comparing seismicity declustering techniques by means of the joint use of Allan Factor and Morisita index, Stochastic Environmental Research and Risk Assessment 30(1):77-90.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
sim_dat <- SwissRoll(1000)

m <- 2
scaleQ <- 1:15 # It starts with a grid of 1^2 cell (or quadrat).
               # It ends with a grid of 15^2 cells (or quadrats).
mMI <- MINDEX_SP(sim_dat[,c(1,2)], scaleQ, m, 5)

plot(mMI[,1],mMI[,2],pch=19,col="black",xlab="",ylab="")
title(xlab=expression(delta),cex.lab=1.5,line=2.5)
title(ylab=expression(I['2,'*delta]),cex.lab=1.5,line=2.5)

## Not run: 
require(colorRamps)
colfunc <- colorRampPalette(c("blue","red"))
color <- colfunc(4)
dev.new(width=5,height=4)
plot(mMI[5:15,1],mMI[5:15,2],pch=19,col=color[1],xlab="",ylab="",
     ylim=c(1,max(mMI[,5])))
title(xlab=expression(delta),cex.lab=1.5,line=2.5)
title(ylab=expression(I['2,'*delta]),cex.lab=1.5,line=2.5)
for(i in 3:5){
  points(mMI[5:15,1],mMI[5:15,i],pch=19,col=color[i-1])
}
legend.text<-c("m=2","m=3","m=4","m=5")
legend.pch=c(19,19,19,19)
legend.lwd=c(NA,NA,NA,NA)
legend.col=c(color[1],color[2],color[3],color[4])
legend("topright",legend=legend.text,pch=legend.pch,lwd=legend.lwd,
       col=legend.col,ncol=1,text.col="black",cex=0.9,box.lwd=1,bg="white")

xlim_l <- c(-5,5)     # By default, the spatial extent of the grid is set so
ylim_l <- c(-6,6)     # that it is the same as the spatial extent of the data.
xlim_s <- c(-0.6,0.2) # But it can be modified to cover either a larger (l)
ylim_s <- c(-1,0.5)   # or a smaller (s) study area (or validity domain).

mMI_l <- MINDEX_SP(sim_dat[,c(1,2)], scaleQ, m, 5, xlim_l, ylim_l)
mMI_s <- MINDEX_SP(sim_dat[,c(1,2)], scaleQ, m, 5, xlim_s, ylim_s)

## End(Not run)

jeangolay/IDmining documentation built on May 6, 2021, 10:49 a.m.