Preparations before fitting with inla()

  • create the mesh
  • define the SPDE model
  • create an index set for the SPDE model
  • construct the projection matrix A
  • create a stack with the data for estimation and prediction