Helper function to generate precision matrix Q for simulation
Helper function to generate precision matrix Q for simulation
This creates the precision matrix from a mesh created by R-INLA with a specified range. This is currently set up to support the standard spde approach of precision matrices and the barrier model version. Similar in purpose to .sp_covar.
.Q( mesh, barrier.triangles, range =50, range_fraction =0.2, sigma_u =1, model ="spde")
Arguments
mesh: The mesh created by R-INLA representing spatial area
barrier.triangles: the list of triangles of the mesh in the barrier, only used for barrier model
range: decorrelation range
range_fraction: the fraction that sets the range over the "land" parts of the barrier model. Only used with the barrier model
sigma_u: the overall variance of the spatial process
model: 'spde' for the SPDE approach, 'barrier' for barrier approach