Skip to contents

Visualize results from a survey index model fitted with get_surveyidx().

Usage

plot_surveyidx(
  x,
  dat,
  alt.idx = NULL,
  myids,
  cols = 1:length(x$pModels),
  select = c("index", "map", "residuals", "fitVsRes"),
  par = list(mfrow = c(3, 3)),
  colors = rev(grDevices::heat.colors(6)),
  map.cex = 1,
  plotByAge = TRUE,
  legend = TRUE,
  predD = NULL,
  year = NULL,
  main = NULL,
  legend.signif = 3,
  legend.pos = "topright",
  restoreOldPar = FALSE,
  mapBubbles = FALSE,
  cutp = NULL,
  ...
)

Arguments

x

Survey index as produced by getsdmgamindex()

dat

DATRASraw object

alt.idx

optional matrix with alternative index

myids

vector of haul ids that constitute the grid

cols

which age columns to consider?

select

character vector of chosen plots. Either one of "index","map","absolutemap","CVmap","residuals","fitVsRes",""resVsYear","resVsShip","spatialResiduals", or a number. Numbers refer to smooths in the order they appear in the formula.

par

'par' settings for plotting (a named list).

colors

colors for spatial effect.

map.cex

size of grid points on maps

plotByAge

boolean (default=TRUE). If true, par(par) is called for each age group.

legend

boolean (default=TRUE). add legends to plot?

predD

DATRASraw object with grid (optional). Overrides 'myids' if supplied.

year

numeric scalar or vector (default=NULL). If 'select' equals 'map' a specific year can be chosen (only meaningful for time-varying spatial effects). If select equals 'absolutemap' or 'CVmap' then year must be a vector.

main

optional main title (overrides default title)

legend.signif

Number of significant digits in map legends

legend.pos

Position of legend (e.g. "bottomleft") see ?legend

restoreOldPar

restore old par() on exit? Default=FALSE

mapBubbles

boolean (default=FALSE) add observation bubbles?

cutp

optional vector of break points for the color scale on maps

...

Additional parameters for plot()

Value

series of production plots

Examples

# plot_surveyidx()