Hi
May someone familiar with the R-INLA Project assist with the question below.
I am trying to produce the posterior difference of marginals.fitted.values from two SPDE models e.g. Chapter 9 Spatial modeling of geostatistical data. Malaria in The Gambia | Geospatial Health Data: Modeling and Visualization with R-INLA and Shiny.
Both models have been fitted to the same spatial points but have used data from two different years. I am interested in knowing whether the prevalence of a disease changed between the two time points. Hence I have opted to do the difference of the posteriors of the marginals.fitted.values from the two models.
I thought this would be a simple subtraction but the structure of the marginals.fitted.values does not allow this.
Any guidance will be appreciated and sorry I may have used wrong terminology I am new in the field. You can also point me to the resources that explain this in detail.
My naive approach that did not work, below:
model1$marginals.fitted.values[index] - model2$marginals.fitted.values[index]
I have asked the same question on the inla project platform but the answers were still too abstract for me to understand. Here is the link to that discussion.
https://groups.google.com/d/msgid/r-inla-discussion-group/9b44ff5f-3a7c-4d39-930f-e2703012fc38n%40googlegroups.com
Let me know if I need to add further details.
Thanks,
McEwen.