Skip to content

PointedSDMs doesn't seem to be taking in my model formula #31

@lganley

Description

@lganley

Hi!
I am fitting a pointedSDM with a covariate that varies spatially and temporally. Maybe I’m misunderstanding, but I was expecting an overall jellyfish covariate effect, not a fixed effect for each monthly layer. I just want to make sure I’m not misinterpreting what is happening here. Any advice would be very appreciated!

I have monthly jellyfish data in a spatraster object :
jelly_brick
class : SpatRaster
dimensions : 261, 415, 6 (nrow, ncol, nlyr)
resolution : 0.08333333, 0.08333334 (x, y)
extent : -77.04167, -42.45833, 34.95833, 56.70833 (xmin, xmax, ymin, ymax)
coord. ref. : lon/lat WGS 84 (EPSG:4326)
source(s) : memory
names : lyr.1, lyr.2, lyr.3, lyr.4, lyr.5, lyr.6
min values : 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000
max values : 0.8303541, 0.8615835, 0.8888214, 0.8910101, 0.9140197, 0.8072638
time (days) : 2013-05-01 to 2013-10-01

I have turtle data with a time column formatted as a date object:
Simple feature collection with 246 features and 7 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: -75.42688 ymin: 36.75136 xmax: -69.8735 ymax: 42.27667
Geodetic CRS: NAD83

A tibble: 246 × 8

SPECIES YEAR MONTH DAY source time geometry citation

  • <POINT [°]>
    1 LEATHERBACK 2013 6 02 citiz… 2013-06-01 (-71.22529 41.62603)

I use this code to specify the model:
hyperParams <- list(model = 'ar1', hyper = list(rho = list(prior = "pc.prec", param = c(0.9, 0.1))))
TurtleModel <- startISDM(TurtleDataSets,
Boundary = lme,
Projection = proj,
temporalName = 'time',
responsePA = "NPRES",
Mesh = mesh,
spatialCovariates = jelly_brick
)
TurtleModel$specifyRandom(temporalModel = hyperParams)

And fit:
modelOptions <- list(control.inla = list(int.strategy = 'eb'), control.fixed = list( mean = 0, prec = 0.25), # SD = 2, allows effects of ±4 (95% CI) control.compute = list( dic = TRUE, waic = TRUE, cpo = TRUE), verbose = TRUE, safe = TRUE)
modelOptions <- list(control.inla =
list(strategy = "adaptive",
int.strategy = "eb"))
turtleEst <- fitISDM(data = TurtleModel, options = modelOptions)

Which returns:
Summary of 'modISDM' object:

inlabru version: 2.12.0
INLA version: 23.09.09

Types of data modelled:

citizen Present only
narwc_pa Present absence
tag Present only

Time used:
Pre = 1.68, Running = 678, Post = 0.878, Total = 681
Fixed effects:
mean sd 0.025quant 0.5quant 0.975quant mode kld
lyr.1 -53.597 2.930 -59.340 -53.597 -47.855 -53.597 0
lyr.2 42.682 2.591 37.604 42.682 47.760 42.682 0
lyr.3 75.581 4.202 67.344 75.581 83.817 75.581 0
lyr.4 -54.490 4.268 -62.856 -54.490 -46.125 -54.490 0
lyr.5 48.692 5.017 38.859 48.692 58.525 48.692 0
lyr.6 -27.623 4.275 -36.001 -27.623 -19.245 -27.623 0
citizen_intercept -18.099 0.731 -19.531 -18.099 -16.666 -18.099 0
narwc_pa_intercept -30.284 0.892 -32.031 -30.284 -28.536 -30.284 0
tag_intercept -20.965 0.768 -22.470 -20.965 -19.461 -20.965 0

Random effects:
Name Model
citizen_spatial SPDE2 model
narwc_pa_spatial Copy
tag_spatial Copy

Model hyperparameters:
mean sd 0.025quant 0.5quant 0.975quant mode
Theta1 for citizen_spatial -4.433 0.001 -4.434 -4.433 -4.432 -4.433
Theta2 for citizen_spatial -1.594 0.001 -1.595 -1.594 -1.593 -1.594
GroupRho for citizen_spatial 0.729 0.000 0.729 0.729 0.730 0.729
Beta for narwc_pa_spatial 0.251 0.001 0.250 0.251 0.252 0.251
Beta for tag_spatial 1.002 0.001 1.001 1.002 1.003 1.002

Deviance Information Criterion (DIC) ...............: NA
Deviance Information Criterion (DIC, saturated) ....: NA
Effective number of parameters .....................: NA

Watanabe-Akaike information criterion (WAIC) ...: -Inf
Effective number of parameters .................: 1.45e+17

Marginal log-Likelihood: -2835.16
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)')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions