Hi,
I have been using INLA to do spatial binomial modelling and prediction over small spatial entities and everything was fine. However, recently I tried on a big dataset with ~20,000 sample points, 30 explanatory variables and ~3.8 million grids (India at 1km2 resolution) for prediction and the modelling crashed due to memory issue (I think, the error reads "Segmentation fault (core dumped)"). I then tried to keep the same mesh at national level but split the prediction grids into 8 chunks, each one consisting 500,000 grids, did prediction one at a time, and mosaic the predicted results in the end. It worked fine but the output map is rather interesting. As you can see in the map, there are roughly 8 horizontal lines/areas which mark high predicted values across India, which I can only attribute to the fact that I did prediction 8 times separately and mosaic them together.
My question is: Is this expected behavior when doing prediction over split data chunks? I should note that because I understand INLA does modelling and prediction the same time, each time I did prediction I effectively rebuilt the inla stack and model, only changing the "A.pred" matrix from the mesh based on the new 500,000 grids in the prediction stack. Should I change the way to proceed?
Thanks so much in advance. I'm happy to provide any detail in data/code if necessary.
Best,
Chengbi