Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.fG_mpm

plot


Description

visualize fits from an fG_mpm object

Usage

## S3 method for class 'fG_mpm'
plot(
  x,
  y = NULL,
  se = FALSE,
  pages = 0,
  ncol = 1,
  ask = TRUE,
  pal = "Zissou1",
  rev = FALSE,
  ...
)

Arguments

x

a foieGras mpm fit object with class fG_mpm

y

optional ssm fit object with class fG_ssm corresponding to x. If absent, 1-d plots of gamma_t time series are rendered otherwise, 2-d track plots with locations coloured by gamma_t are rendered.

se

logical (default = FALSE); should points be scaled by gamma_t uncertainty (ignored if y is not supplied)

pages

plots of all individuals on a single page (pages = 1; default) or each individual on a separate page (pages = 0)

ncol

number of columns to use for faceting. Default is ncol = 1 but this may be increased for multi-individual objects. Ignored if pages = 0

ask

logical; if TRUE (default) user is asked for input before each plot is rendered. set to FALSE to return ggplot objects

pal

hcl.colors palette to use (default: "Zissou1"; type hcl.pals() for options)

rev

reverse colour palette (logical)

...

additional arguments to be ignored

Value

a ggplot object with either: 1-d time series of gamma_t estimates (if y not provided), with estimation uncertainty ribbons (95 % CI's); or 2-d track plots (if y provided) coloured by gamma_t, with smaller points having greater uncertainty (size is proportional to SE^-2, if se = TRUE). Plots can be rendered all on a single page (pages = 1) or on separate pages.

Examples

# plot mpm fit object
# 1-d time-series plots
plot(xm) 

## generate a fG_ssm fit object (call is for speed only)
xs <- fit_ssm(sese2, spdf=FALSE, model = "rw", time.step=72, 
control = ssm_control(se = FALSE, verbose = 0))

# 2-d track plots by adding ssm fit object
plot(xm, xs)

foieGras

Fit Continuous-Time State-Space and Latent Variable Models for Quality Control of Argos Satellite (and Other) Telemetry Data and for Estimating Movement Behaviour

v0.7-6
MIT + file LICENSE
Authors
Ian Jonsen [aut, cre, cph], Toby Patterson [aut, ctb]
Initial release
2021-04-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.