I am I PhD student working on some ecological modelling for a study with an opportunistic sampling design
We have overall survey sites and polygons representing the transects we actually walked within each site. The transects have equal sampling effort. The survey sites are scatted across the state - sometimes hundreds of km apart.
Each transect is only 15m wide. The shortest tis probably 30m long and the longest is a couple hundred meters. There are 217 observations across all the sites (which is not very many at all). Green=survey site, Blue=transects.
I am using INLA- SPDE to capture the spatial field. Once I do that, many of my covariate signals get absorbed. The covariates are all resampled to the same resolution and standardized.
I can't help thinking two things.
1. There may not be a good way to make a mesh for my scattered tiny transect over hundreds of km (see below). Adding a boundary breaks the model.
2. By including the spatial field and washing out my covariates, I am losing some ecologically relevant conclusions My covs, for example, are forest canopy cover, observations of non target species, cos_aspect, sin_spect. I can see why they get muddled up into the spatial field.
As a newbie, I was wondering if my approach and concerns seem reasonable? Secondly, if there are any experienced folks that are thinking, "no no no, this is absolutely the wrong approach for these data." No one in my dept is really working on this and, given my small data set, it would be easy to make misleading conclusions.
# ----------------------------
# SPDE
# ----------------------------
spde <- inla.spde2.pcmatern(
mesh = mesh,
prior.range = c(10000, 0.5),
prior.sigma = c(2, 0.01)
)
spatial_index <- inla.spde.make.index(
name = "spatial",
n.spde = spde$n.spde
)
A <- inla.spde.make.A(mesh, loc = coords)
# ----------------------------
# FORMULA
# ----------------------------
formula_spatial <- y ~ -1 +
intercept +
offset(log_area) +
sin_aspect +
cos_aspect +
canopy_2023 +
herpobs_500m +
hii +
f(spatial, model = spde)
Time used:
Pre = 0.973, Running = 3.66, Post = 0.185, Total = 4.81
Fixed effects:
mean sd 0.025quant 0.5quant 0.975quant mode kld
intercept -10.497 1.025 -12.573 -10.478 -8.534 -10.479 0
sin_aspect -0.126 0.178 -0.483 -0.124 0.218 -0.124 0
cos_aspect -0.653 0.523 -1.674 -0.656 0.382 -0.656 0
canopy_2023 0.223 0.745 -1.215 0.214 1.710 0.214 0
herpobs_500m -0.016 0.024 -0.060 -0.017 0.037 -0.021 0
hii 0.499 0.648 -0.732 0.475 1.862 0.475 0
Random effects:
Name Model
spatial SPDE2 model
Model hyperparameters:
mean sd 0.025quant 0.5quant 0.975quant mode
size for nbinomial_1 zero-inflated observations 1653.378 1.81e+04 3.860 113.372 1.04e+04 6.686
zero-probability parameter for zero-inflated nbinomial_1 0.065 8.00e-02 0.002 0.036 2.98e-01 0.004
Range for spatial 2928.950 1.64e+03 1025.503 2530.062 7.24e+03 1923.618
Stdev for spatial 1.416 3.85e-01 0.817 1.364 2.32e+00 1.263
Deviance Information Criterion (DIC) ...............: 191.25
Deviance Information Criterion (DIC, saturated) ....: -2630.50
Effective number of parameters .....................: 22.99
Watanabe-Akaike information criterion (WAIC) ...: 191.03
Effective number of parameters .................: 18.21
Marginal log-Likelihood: -132.34
CPO, PIT is computed
Posterior summaries for the linear predictor and the fitted values are computed
(Posterior marginals needs also 'control.compute=list(return.marginals.predictor=TRUE)')