map_ssm function

Plot estimated track, behavioural states and observations on a map.

Plot estimated track, behavioural states and observations on a map.

Takes a fitted fit_ssm object and plots the observed (data) and estimated locations on a map. For the behavioural models (DCRWS, hDCRWS), the estimated locations are coloured according to the posterior mean behavioural state estimates.

map_ssm(fit, onemap = TRUE)

Arguments

  • fit: an output object from fit_ssm
  • onemap: If TRUE (default) then all estimated tracks are plotted on a single, combined map, if FALSE then tracks are plotted on separate maps.

Returns

Observed locations are plotted as '+' symbols and estimated locations as filled circles. Individual track id's (for DCRW and DCRWS models) are displayed at the top of each plot, but only when onemap = FALSE. The model specified in fit_ssm is also displayed at the top. Takes advantage of ggplot2 plotting functions.

Currently, results from the hierarchical models (hDCRW, hDCRWS) can only be plotted on a combined map.

Examples

## Not run: data(ellie) fit.s <- fitSSM(ellie, model = "DCRWS", tstep = 1, adapt = 100, samples = 100, thin = 1, span = 0.1) map_ssm(fit.s, onemap = TRUE) hfit.s <- fit_ssm(ellie, model = "hDCRWS", tstep = 1, adapt = 100, samples = 100, thin = 1, span = 0.1) map_ssm(hfit.s) ## End(Not run)
  • Maintainer: Ian Jonsen
  • License: GPL-2
  • Last published: 2020-09-01