compute_mesh create objects required for INLA analysis of an object of class "CRTsp".
compute_mesh(
trial = trial,
offset = -0.1,
max.edge = 0.25,
inla.alpha = 2,
maskbuffer = 0.5,
pixel = 0.5
)list
prediction Data frame containing the prediction points and covariate values
A projection matrix from the observations to the mesh nodes.
Ap projection matrix from the prediction points to the mesh nodes.
indexs index set for the SPDE model
spde SPDE model
pixel pixel size (km)
an object of class "CRTsp" or a data frame containing locations in (x,y) coordinates, cluster
assignments (factor cluster), and arm assignments (factor arm) and outcome.
see inla.mesh.2d documentation
see inla.mesh.2d documentation
parameter related to the smoothness (see inla documentation)
numeric: width of buffer around points (km)
numeric: size of pixel (km)
compute_mesh carries out the computationally intensive steps required for setting-up an
INLA analysis of an object of class "CRTsp", creating the prediction mesh and the projection matrices.
The mesh can be reused for different models fitted to the same
geography. The computational resources required depend largely on the resolution of the prediction mesh.
The prediction mesh is thinned to include only pixels centred at a distance less than
maskbuffer from the nearest point.
A warning may be generated if the Matrix library is not loaded.