My goal is to use bivariate marks variogram to analyze correlations between trees with different radial levels. But I didn't find a bivariate function about numeric markers, tried the markcorr function (where the f parameter is set to f = function(m1, m2) { (m1 - m2)^2 / 2}
)and the markvario function, I can't manipulate bivariate mode. How should I apply the markcorr or markvario function between trees of different diameters (e.g. DBH<5 for young trees and DBH>10 for large trees)?
I used the markcorr and markvario functions for univariate pattern analysis, as well as multi-type analysis (labeled at the factor level), but did not master the bivariate analysis code for numeric markers (breast diameter), and I also tried setting the f parameter in the markcorr function.
univariate patterns:
X1 <- ppp(X[,2],X[,3],c(0,100),c(0,100),marks = X$DBH) #DBH is the tree diameter
plot(envelope(X1,markvario,normalise = T,nsim = 199, simulate=expression(rlabel(X1,labels=marks(X1),permute=TRUE)), savefuns=TRUE,savepatterns=TRUE) )
Y2 <- ppp(Y[,2],Y[,3],c(0,100),c(0,100),marks = Y$DBH)
plot(envelope(Y2,markvario,normalise = T,nsim = 199, simulate=expression(rlabel(Y2,labels=marks(Y2),permute=TRUE)), savefuns=TRUE,savepatterns=TRUE) )
bivariate patterns:
What would be the strategy for bivariate comparison between the X1 and Y2 pattern points, using a mark variogram functionmarkvario
?
The mark correlation function and mark variogram are designed for numeric marks (such as tree diameter). If you want to apply them to binary marks, you could "trick" these functions by simply converting the data to binary values, e.g.
and then applying
markcorr
ormarkvario
.However, it would be more advisable to use the functions that are specifically designed for multitype point patterns (point patterns where the points are classified into different types). The functions include
markconnect
andpcfcross
.Example: