Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Re: [r-inla] accounting for low detectability observations

22 views
Skip to first unread message

Helpdesk (Haavard Rue)

unread,
Apr 19, 2025, 1:48:23 PMApr 19
to Sylvan Benaksas, R-inla discussion group
You can always define an intermediate level barrier, like a semi-barrier, in the
barrier model itself, to have barriers, semi-barriers and then no barriers.

the INLAspacetime package support this feature.

We're working on this problem (with a marine application) and the preprint
should be ready before mid-June

Best
H


On Tue, 2025-04-15 at 02:55 -0700, Sylvan Benaksas wrote:
> Hello,
>
> I am building a Binary spatial model for river barriers, all barriers are
> known but their passability for fish is not. During dry spells the water
> levels are too low to properly assess whether a barrier is passable and we
> have information on this, almost all records during low river flows were
> recorded as not a barrier:
>
>                   No Yes
>   free flowing 17929 3542
>   low flow 6103 8
>
> I am trying to keep this low flow data instead of removing it (it is 22% of
> dataset) and trying to figure out how to deal with this? I am applying a fixed
> factor for flow status and I have read about using weights, to down weight the
> low flow data? will this still be affecting the spatial random field?
>
> here is my model:
>
> barrier.model = inla.barrier.pcmatern(mesh, 
>                                       barrier.triangles =  barrier.tri,
>                                       prior.range = c(30, 0.5),
>                                       prior.sigma = c(0.05, 0.001)) 
>
> f1<- barr ~ -1 + intercept +
>   width_s+
>   slope_60+
>   f(elev_sm, model=spde_elev)+
>   catch_area+
>   winter_rain+
>   flow +
>   land_use+
>   land_use:width_s+
>   land_use:winter_rain+
>   f(w, model = barrier.model)
>
>
> ### fitting model ------------------------------------------------------------
> ----
> bar_mod <- inla(f1,
>                     family = "binomial",     ### have to provide the data via
> data option, below
>                     data = inla.stack.data(Stack2),
>                     #adding fixed effect priors-----------
>                     control.fixed = list(prec=0.5,
>                                          prec.intercept=1,
>                                          mean.intercept=0),
>                     control.compute = list(config = TRUE,    #' Allow for
> posterior simulation
>                                            dic = TRUE),#,      
>                     #waic = TRUE), #,   
>                     #residuals = TRUE)
>                     control.predictor = list(A = inla.stack.A(Stack2),
>                                              compute = TRUE, #' Calculate
> fitted values
>                                              link = 1),
>                     #faster integration for now change later for accuracy
>                     control.inla=list(strategy="adaptive"), 
>                     verbose=T) 
> --
> You received this message because you are subscribed to the Google Groups "R-
> inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to r-inla-discussion...@googlegroups.com.
> To view this discussion, visit
> https://groups.google.com/d/msgid/r-inla-discussion-group/f2b72865-90db-4e1d-a5b9-be8fc1569185n%40googlegroups.com
> .

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

Helpdesk (Haavard Rue)

unread,
Apr 19, 2025, 1:52:49 PMApr 19
to Sylvan Benaksas, R-inla discussion group, David B.Dahl, Alexandre De Bustamante Simas

if you're on river networks, then using the
https://davidbolin.github.io/MetricGraph/
would be better than the barrier model

one just need to add the 'barrier' model to these (like two or three levels of
the range..., or one range then one or more levels that is a fixed fraction of
it)

@David, @Alex ?
--
Håvard Rue
he...@r-inla.org
Reply all
Reply to author
Forward
0 new messages