0

I have some areal data (disease mapping) to model. I want to predict the number of cases of a disease, considering spatio-temporal effects using R-INLA.

My data has these columns: city code; year; month; latitude; longitude; number of cases.

I know that in R-INLA with the poly2nb and nb2INLA functions I can create a graph file and latter I can use this file as an argument to the "graph" parameter on the formula.

The problem is: I don't know how to make this graph file. I can get polygons of the cities I'll be working on (the cities are brazilian and the package geobr seems very useful for this). However, I don't know how to effectively join this polygons information with my data and make the graph file with this (remembering that my data is also temporal, so I have one line to each city, month and year triplets).

Can someone help me?

  • it's not a problem that you repeated measures of each city, it gets more complicated if the spatial network changes over time, but it doesn't sound like that's the case. You don't need to join data with the spatial network, but you need to make sure the information is shared. If you provide the code, as far as you've gotten, we can help – SushiChef Jun 28 '23 at 17:05
  • Thanks for the help. I managed to solve this using the geobr package. – Moisés Augusto Jul 03 '23 at 22:56

0 Answers0