Skip to contents

Anisotropy is when spatial correlation is directionally dependent. These plotting functions help visualise the estimated anisotropy from a gllvmTMB() fit that used spatial_*() keywords with an anisotropic SPDE mesh.

Usage

plot_anisotropy(object, return_data = FALSE)

plot_anisotropy2(object, model = 1)

Arguments

object

A fitted gllvmTMB model object with an anisotropic spatial component.

return_data

Logical. Return a data frame? plot_anisotropy() only.

model

Which model if a delta model (only for plot_anisotropy2(); plot_anisotropy() always plots both).

Value

plot_anisotropy(): One or more ellipses illustrating the estimated anisotropy. The ellipses are centred at coordinates of zero in the space of the X-Y coordinates being modelled. The ellipses show the spatial range (distance at which correlation is effectively independent) in any direction from zero. Uses ggplot2. If anisotropy was turned off when fitting the model, NULL is returned instead of a ggplot2 object.

plot_anisotropy2(): A plot of eigenvectors illustrating the estimated anisotropy. A list of the plotted data is invisibly returned. Uses base graphics. If anisotropy was turned off when fitting the model, NULL is returned instead of a plot object.

References

Code adapted from VAST and TMB anisotropy examples, via sdmTMB.