Can you use a barrier model and model covariates for autocorrelation (kappa, tau)?

8 views
Skip to first unread message

Chris Smith

unread,
Nov 22, 2025, 1:25:24 PM (3 days ago) Nov 22
to R-inla discussion group
Dear INLA community,
    Apologies for posting so many questions. This was a separate topic, and is also one I have been struggling to find an answer to in the literature.  I have read through the chapter on the barrier model in Advanced Spatial Modeling, and have a study area with several large lakes (ie. Lake Tahoe) that I would like to create a barrier across. I also have a strong need to model covariates on the spatial autocorrelation (kappa and tau), and am realizing that these are both non-stationary spatial random effects.   

form.barrier <- y ~ 0 + intercept + f(s, model = barrier.model)
formula <- y ~ 0 + f(i, model = spde)


My questions are:
1. Can you create one model using both of these spatial random effects? Does this create any problems for INLA? 

formula <- y ~ 0 + fixed effects + f(s,  model = barrier.model) + f(i, model = spde)


2. If they cannot be combined, I realize the older stationary method of just creating a 'hole' within the mesh with a polygon has theoretical problems (Neumann boundary conditions), but is it accurate enough to still use? I have 1-5 lakes that are <2% of my study area.

Thanks for any help you can give!

Helpdesk (Haavard Rue)

unread,
Nov 23, 2025, 1:59:00 AM (3 days ago) Nov 23
to Chris Smith, R-inla discussion group
On Sat, 2025-11-22 at 10:25 -0800, Chris Smith wrote:
> My questions are:
> 1. Can you create one model using both of these spatial random effects? Does
> this create any problems for INLA? 
>
> formula <- y ~ 0 + fixed effects + f(s,  model = barrier.model) + f(i, model =
> spde)

sure, no problem.

--
Håvard Rue
he...@r-inla.org

Chris Smith

unread,
Nov 23, 2025, 1:49:45 PM (2 days ago) Nov 23
to R-inla discussion group
Thanks Dr. Rue!
Reply all
Reply to author
Forward
0 new messages