Skip to contents

Create a prediction field from the parsed model output and the mesh

Usage

create_prediction_field(
  mesh,
  plot_type = "predicted_mean_fields",
  data_dist = "poisson",
  var_a = NULL,
  var_b = NULL
)

Arguments

mesh

INLA/fmesher mesh

plot_type

Type of plot to create, "predicted_mean_fields" or "random_mean_fields"

data_dist

Type of data, "poisson" or "gaussian"

var_a

Data for variable a (numeric), required for "predicted_mean_fields" and "random_effect_fields"; normally, random effect field from "summary.random$f"

var_b

Data for variable b (numeric), required for "predicted_mean_fields"; normally, fixed effect from "summary.fixed"

Value

data.frame with mesh node latlong coordinates (x, y) and the selected field values at the mesh nodes (z)