plot.INLAMRA: Plots the output from INLAMRA

Description Usage Arguments Details Value Examples

View source: R/plotFunctions.R

Description

Plots the predictions or the marginal posteriors produced by INLAMRA. The predictions can only be plotted if the data are found in the INLAMRA object (it will be the case unless the user explicitly disabled it by setting control parameter saveData to FALSE).

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'INLAMRA'
plot(
  x,
  filename = NULL,
  type = c("joint", "training", "predictions", "SD", "marginals"),
  polygonsToOverlay = NULL,
  control = NULL,
  ...
)

Arguments

x

INLAMRA object,

filename

Character. File in which to save the output.

type

Character. The default, "joint" creates a grid of plots, one plot per time value, showing training data incremented with the predictions. ""SD" creates a grid of plots showing standard deviations for predictions. "trainingData" and "predictions" produce a similar grid with only the training data and predictions, respectively. "pars" produces plots of the marginal posterior densities for the parameters and hyperparameters.

polygonsToOverlay

Optional SpatialPolygons object. Those polygons, e.g. regional boundaries, are added to each prediction map.

control

List of control options, cf. ?plot.control.

...

Arguments for the graphics engine; 'width' and 'height' should be especially helpful.

Details

The function produces a grid of rasters by default, one per time value. If your data are not spaced regularly, you can plot the result as points instead by setting 'control = plot.control(plotRaster = FALSE)'. If you have data collected over more than a few days, selecting the days to plot with the 'timeValues' option in control is recommended.

Value

A list of the plotted raster/SpatialPoints objects if type is anything but "pars"; a list of matching x/y values for the plotted (hyper)parameter posteriors otherwise.

Examples

1
2
3
4
## Not run: 
INPUT_AN_EXAMPLE()

## End(Not run)

villandre/MRAinla documentation built on April 20, 2021, 7:49 a.m.