# Example with an adjacency matrix (autoregressive model):
# see 'adjacency' documentation page
#### Mat<U+00E9>rn correlation using only the Matern() syntax
if (spaMM.getOption("example_maxtime")>1.2) {
data(Loaloa)
HLCor(cbind(npos,ntot-npos)~elev1+elev2+elev3+elev4+maxNDVI1+seNDVI
+Matern(1|longitude+latitude),data=Loaloa,
family=binomial(),ranPars=list(nu=0.5,rho=1/0.7))
}
<!-- %- : tested in simulate.HLCor.Rd -->
#### Mat<U+00E9>rn correlation using a distMatrix
data(blackcap)
MLdistMat <- as.matrix(proxy::dist(blackcap[,c("latitude","longitude")]))
HLCor(migStatus ~ means+ Matern(1|latitude+longitude),data=blackcap,
distMatrix=MLdistMat,HLmethod="ML",ranPars=list(nu=0.6285603,rho=0.0544659))
Run the code above in your browser using DataLab