grab() lets you obtain fitted, predicted, rerouted or data tibble's from a compound tibble created when fitting to multiple individual data sets. The specified tibble's are appended to a single output tibble.

grab(x, what = "fitted", as_sf = FALSE, normalise = FALSE, group = FALSE)

Arguments

x

a aniMotum ssm_df or mpm_df model object

what

the tibble to be grabbed; either fitted, predicted, rerouted (ssm_df only), or data (single letters can be used).

as_sf

logical; if FALSE (default) then return a tibble with un-projected longlat coordinates, otherwise return an sf tibble. Ignored if x is an mpm model object.

normalise

logical; if output includes a move persistence estimate, should g (the move persistence index) be normalised to have minimum = 0 and maximum = 1 (default = FALSE). Note, this normalisation is not applied to the standard errors of the logit-scale move persistence estimates (logit_g, logit_g.se).

group

logical; should g be normalised among individuals as a group, a 'relative g', or to individuals separately to highlight regions of lowest and highest move persistence along single tracks (default = FALSE).

Value

a tibble with all individual tibble's appended

Details

if multiple ssm_df model objects are present in x, as_sf = TRUE, and at least 1 estimated track has a coordinate reference system (crs) with longitude centered on 180 (e.g. a track straddling -180,180) then all tracks will be re-projected to that crs.

Examples

## generate an ssm fit object
xs <- fit_ssm(ellie, spdf=FALSE, model = "rw", time.step=24, control = ssm_control(verbose = 0))
#> 

## grab predicted values as an un-projected tibble
preds <- grab(xs, what = "predicted")