map_ssm: Plot estimated track, behavioural states and observations on...

Description Usage Arguments Value Examples

View source: R/map_ssm.R

Description

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.

Usage

1
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.

Value

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

ianjonsen/bsam documentation built on Sept. 8, 2020, 2:17 a.m.