Skip to contents

Constructs mean, standard deviation, and quantile (0.025, 0.5 and 0.975) maps for models calculated using uniSpace and ppSpace

Usage

map(
  model,
  dmesh,
  dims,
  region = NULL,
  mask = FALSE,
  sample = FALSE,
  nsamples = 100
)

Arguments

model

An object of class ppSpace or of class uniSpace.

dmesh

The dmesh list

dims

A vector of length 2 defining the number of pixels to use as rows and columns to define the map. Currently this argument is ignored and the output raster is taken from the predictor raster in the dmesh object.

region

A spatial polygon to isolate the region of interest. If none is given, a map is drawn for the entire region covered by the mesh.

mask

Logical. Whether to mask the output raster with the region. Default is FALSE.

sample

Logical. Whether to sample from the posterior distribution of each cell using INLA's inla.posterior.sample. Returns a raster stack of each sample along with other types specified. Default to FALSE. Currently ignored.

nsamples

Integer. Number of samples to draw from the posterior. Ignored if sample = FALSE.

Value

A terra raster with model predictions and uncertainty layers

Details

none

References

none