The distance between adjacent points is 1. Function dbmem() automatically
computes the threshold value, 1 in this case.
# Plot some dbMEM variables modelling positive spatial correlation
#
along a transect (Fig. 7.3)
par(mfrow = c(4, 2))
somedbmem <- c(1, 2, 4, 8, 15, 20, 30, 40)
for(i in 1:length(somedbmem)){
plot(tr100.dbmem[ ,somedbmem[i]],
type = "l",
xlab = "X coordinate",
ylab = c("dbMEM", somedbmem[i]))
}
# 2. Two-dimensional sampling: grid of equispaced points with
#
smallest distance between points equal to 1 (Fig. 7.4).
# Generate grid point coordinates
xygrid2 <- expand.grid(1:20, 1:20)
# Creation of the dbMEM eigenfunctions with positive Moran's I
xygrid2.dbmem.tmp <- dbmem(xygrid2)
xygrid2.dbmem <- as.data.frame(xygrid2.dbmem.tmp)
# Count the eigenvalues
length(attributes(xygrid2.dbmem.tmp)$values)
# Plot some dbMEM variables using s.value {adegraphics}
somedbmem2 <- c(1, 2, 5, 10, 20, 40, 80, 120, 189)
s.value(xygrid2, xygrid2.dbmem[ ,somedbmem2],
method = "color",
symbol = "circle",
ppoints.cex = 0.5
)
Hints Function dbmem() has an argument called MEM.autocor to compute all or a
subset of the spatial eigenfunctions. Default MEM.autocor="positive"
computes the dbMEM with Moran's I larger than their expected value (eq. 7.4),
i.e. those modelling structures with positive spatial correlation. Usually, there are
also one 0 eigenvalue and several negative ones; the corresponding eigenvectors
can be produced by calling one of the alternative choices in MEM.autocor:
"non-null", "all", "negative".
Here we applied function dbmem() to the matrix of geographical coordinates of
the sites. The function also accepts matrices of geographical distances.
In the code that produced Fig. 7.4, see how the function s.value() of
adegraphics can produce nine plots with a single call.
7.4 Eigenvector-Based Spatial Variables and Spatial Modelling
319
computes the threshold value, 1 in this case.
# Plot some dbMEM variables modelling positive spatial correlation
#
along a transect (Fig. 7.3)
par(mfrow = c(4, 2))
somedbmem <- c(1, 2, 4, 8, 15, 20, 30, 40)
for(i in 1:length(somedbmem)){
plot(tr100.dbmem[ ,somedbmem[i]],
type = "l",
xlab = "X coordinate",
ylab = c("dbMEM", somedbmem[i]))
}
# 2. Two-dimensional sampling: grid of equispaced points with
#
smallest distance between points equal to 1 (Fig. 7.4).
# Generate grid point coordinates
xygrid2 <- expand.grid(1:20, 1:20)
# Creation of the dbMEM eigenfunctions with positive Moran's I
xygrid2.dbmem.tmp <- dbmem(xygrid2)
xygrid2.dbmem <- as.data.frame(xygrid2.dbmem.tmp)
# Count the eigenvalues
length(attributes(xygrid2.dbmem.tmp)$values)
# Plot some dbMEM variables using s.value {adegraphics}
somedbmem2 <- c(1, 2, 5, 10, 20, 40, 80, 120, 189)
s.value(xygrid2, xygrid2.dbmem[ ,somedbmem2],
method = "color",
symbol = "circle",
ppoints.cex = 0.5
)
Hints Function dbmem() has an argument called MEM.autocor to compute all or a
subset of the spatial eigenfunctions. Default MEM.autocor="positive"
computes the dbMEM with Moran's I larger than their expected value (eq. 7.4),
i.e. those modelling structures with positive spatial correlation. Usually, there are
also one 0 eigenvalue and several negative ones; the corresponding eigenvectors
can be produced by calling one of the alternative choices in MEM.autocor:
"non-null", "all", "negative".
Here we applied function dbmem() to the matrix of geographical coordinates of
the sites. The function also accepts matrices of geographical distances.
In the code that produced Fig. 7.4, see how the function s.value() of
adegraphics can produce nine plots with a single call.
7.4 Eigenvector-Based Spatial Variables and Spatial Modelling
319
