Hi folks,
I'm working on a marine integrated species distribution model (ISDM) using inlabru and the PointedSDMs wrapper. My model combines two data sources:
Presence-Only (PO) Data:
Collected over 12 months, this dataset is highly spatially biased but provides valuable temporal information on dynamic covariates (temperature).
Presence-Absence (PA) Data:
Derived from a survey (1 month) with good spatial coverage, providing static covariates such as bathymetry and slope.
My goal is to build an integrated model that incorporates bathymetry and slope from the PA data and temperature from the PO data, in which I want to model PO as an IPP and PA Binomial. To test whether the model can capture the dynamic distribution driven by temperature variations, I’m currently focusing on modelling only the PO data.
In my workflow, I define the temporal component by including a "month" variable in the PO dataset. In the startISDM() call, I specify the temporal variable as follows:
organizedData_PO <- startISDM(
data = po_sf,
Mesh = mesh,
Projection = proj_azores,
spatialCovariates = env_stack_bst_masked,
Boundary = boundary_inner_PO,
responseCounts = "counts",
pointsSpatial = "individual",
temporalName = "month"
)
For temperature, I combine the 12 monthly layers into a dynamic component using changeComponents(): (I also use a 1D SPDE for temperature to capture a non linear response)
organizedData_PO$changeComponents(
"temperature(
main = I(
(month == 1)*temperature_month1 +
(month == 2)*temperature_month2 +
(month == 3)*temperature_month3 +
(month == 4)*temperature_month4 +
(month == 5)*temperature_month5 +
(month == 6)*temperature_month6 +
(month == 7)*temperature_month7 +
(month == 8)*temperature_month8 +
(month == 9)*temperature_month9 +
(month == 10)*temperature_month10 +
(month == 11)*temperature_month11 +
(month == 12)*temperature_month12
),
model = INLA::inla.spde2.pcmatern(
mesh = fmesher::fm_mesh_1d(
loc = seq(-2, 2, length.out = 20),
boundary = 'free'
),
alpha = 2,
prior.range = c(1, 0.05),
prior.sigma = c(1, 0.05),
constr = TRUE
)
)"
)
However, I'm not entirely sure if this is the most elegant or robust way to link the temporal "month" variable from the PO sf to the dynamic temperature SPDE fields. I am wondering:
Lastly, while I am working in the PointedSDMs package, I would also appreciate answers that tackle this issue for general inla/inlabru.
Many thanks in advance,
Moritz