changes in effective parameters for gamma hurdle model

36 views
Skip to first unread message

Ben Marcek

unread,
Jul 26, 2022, 8:28:48 AM7/26/22
to R-inla discussion group
Hello,
I am new to using R-INLA and I'm trying to run a gamma hurdle model with a spatial barrier. I have no issues with the bernoulli portion of the model, but when I run the gamma portion of the model model using a more standard mesh (i.e., no barrier), I get DIC effective parameters = 15.35 vs WAIC = 14.66. When I run the same model with a mesh that includes a barrier, the effective number of parameters increases dramatically (DIC = 108.99 and WAIC = 273.23) and with it the DIC and WAIC values also increase dramatically. In addition, the conclusions drawn from the two models also differ substantially. Can anyone tell me why this might be and if I am doing something wrong? The only idea that I have is that this is resulting from the number of vertices included in the mesh (non-barrier = 802, barrier = 40455).
Thank you for any insights,
Ben

Elias T. Krainski

unread,
Jul 26, 2022, 10:44:02 AM7/26/22
to R-inla discussion group
Seems like the two meshes are capturing variations at different resolutions. How about trying with the same or similar mesh?

--
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 on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/8c1a7161-cbb1-4cc0-90e3-d0405d2cb9dfn%40googlegroups.com.

Ben Marcek

unread,
Jul 26, 2022, 1:02:06 PM7/26/22
to R-inla discussion group
Thank you for the response,
The challenge that I'm having with the meshes is that, because I am interested in sampling locations within a river, the resolution needs to be relatively high in the river itself, but outside the river the resolution can be coarse because sampling does not occur on land. Would you suggest increasing the resolution for the non-barrier mesh to something that results in a similar number of vertices as in the mesh with a barrier? Should I move away from examining the mesh that lacks a barrier because sampling cannot occur outside the river and, therefore, the correlations may be spurious? I appreciate the help and I've included the code used to create the two meshes below for reference.
Ben

mesh1 <- inla.mesh.2d(loc = loc,
                      boundary = nonconv_hull,
                      max.edge = c(1, 5) * maxedge,
                      cutoff = maxedge / 5)

spde1 <- inla.spde2.pcmatern(mesh1,
                             prior.range = c(100000, 0.01),
                             prior.sigma = c(2.5, 0.01))



domain <- inla.nonconvex.hull(as.matrix(loc))

mesh2 <- inla.mesh.2d(boundary = domain,
                      interior = MSR.bdry2,
                      max.edge = max.edge,
                      cutoff = 50)

Range0      <- 100 * 1000 
AlphaRange0 <- 0.05
Sigma0      <- 2.5
AlphaSigma0 <- 0.05

spde2 <- inla.barrier.pcmatern(mesh2,
                               barrier.triangles = TriangleInBarrier,
                               prior.range = c(Range0, AlphaRange0),
                               prior.sigma = c(Sigma0, AlphaSigma0),
                               range.fraction = 0.1)

Finn Lindgren

unread,
Jul 26, 2022, 1:52:43 PM7/26/22
to Ben Marcek, R-inla discussion group
I don’t see why you can’t use the same mesh that use use with the barrier model also when you run the ordinary pcmatern model?
But one potentially crucial issue is that based on you range priors, you’re working in metres, for a domain that’s several hundred kilometres in size? That can easily lead to numerical instability, so I would strongly recommend converting all the data and meshed into kilometres instead.

Finn

On 26 Jul 2022, at 18:02, Ben Marcek <ben.m...@gmail.com> wrote:



Ben Marcek

unread,
Aug 5, 2022, 3:00:06 PM8/5/22
to R-inla discussion group
Hello,
I wanted to thank you for the helpful tips. It took me a little while to get back to running through these models, but everything seems to be working now.
Thanks again,
Ben
Reply all
Reply to author
Forward
0 new messages