julianfaraway / brinla

Bayesian Regression with INLA
GNU General Public License v3.0
45 stars 23 forks source link

Using bri.beta.resid for SPDE Beta Regression #5

Closed skeyser closed 1 year ago

skeyser commented 1 year ago

Hello Julian,

This "issue" is more of a question. Do you have any existing functions or code that can be used to apply the bri.beta.resid to a spatial model fit in INLA using the "beta" family fitted using the popular SPDE spatial models?

Tinkering with the code it seems like the matrix sizes become much larger than in the non-spatial matrices calculated in the bri.beta.resid function (presumably due to the sparseness of the distance matrix in the spatial flavor) and this creates a mismatch (and a subsequent error) for the calculation of the residuals. My ultimate goal is to look at semi-variograms between a non-spatial and spatial beta regression model to see how the spatial term deals with the residual autocorrelation.

julianfaraway commented 1 year ago

We intentionally excluded spatial models from our book (which this R package supports) so we have not tried that. You might have a look at inlabru or ask the researchers behind it.

skeyser commented 1 year ago

Hi Julian,

Okay, that was what I figured. I can look into inquiring from the inlabru/inla spatial folks regarding this issue. I'll go ahead and close this and thanks for the response.