The challenge that I'm having with the meshes is that, because I am interested in sampling locations within a river, the resolution needs to be relatively high in the river itself, but outside the river the resolution can be coarse because sampling does not occur on land. Would you suggest increasing the resolution for the non-barrier mesh to something that results in a similar number of vertices as in the mesh with a barrier? Should I move away from examining the mesh that lacks a barrier because sampling cannot occur outside the river and, therefore, the correlations may be spurious? I appreciate the help and I've included the code used to create the two meshes below for reference.
Ben
mesh1 <- inla.mesh.2d(loc = loc,
boundary = nonconv_hull,
max.edge = c(1, 5) * maxedge,
cutoff = maxedge / 5)
spde1 <- inla.spde2.pcmatern(mesh1,
prior.range = c(100000, 0.01),
prior.sigma = c(2.5, 0.01))
domain <- inla.nonconvex.hull(as.matrix(loc))
mesh2 <- inla.mesh.2d(boundary = domain,
interior = MSR.bdry2,
max.edge = max.edge,
cutoff = 50)
Range0 <- 100 * 1000
AlphaRange0 <- 0.05
Sigma0 <- 2.5
AlphaSigma0 <- 0.05
spde2 <- inla.barrier.pcmatern(mesh2,
barrier.triangles = TriangleInBarrier,
prior.range = c(Range0, AlphaRange0),
prior.sigma = c(Sigma0, AlphaSigma0),
range.fraction = 0.1)