plot.moveHMM: Plot 'moveHMM'

View source: R/plot_moveHMM.R

plot.moveHMMR Documentation

Plot moveHMM

Description

Plot the fitted step and angle densities over histograms of the data, transition probabilities as functions of the covariates, and maps of the animals' tracks colored by the decoded states.

Usage

## S3 method for class 'moveHMM'
plot(
  x,
  animals = NULL,
  ask = TRUE,
  breaks = "Sturges",
  col = NULL,
  plotTracks = TRUE,
  plotCI = FALSE,
  alpha = 0.95,
  ...
)

Arguments

x

Object moveHMM

animals

Vector of indices or IDs of animals for which information will be plotted. Default: NULL; all animals are plotted.

ask

If TRUE, the execution pauses between each plot.

breaks

Histogram parameter. See hist documentation. See hist documentation. Default: NULL ; the function sets default values.

col

Vector or colors for the states (one color per state).

plotTracks

If TRUE, the Viterbi-decoded tracks are plotted (default).

plotCI

If TRUE, confidence intervals are plotted on the transition probabilities (default: FALSE).

alpha

Significance level of the confidence intervals if plotCI=TRUE. Default: 0.95 (i.e. 95% CIs).

...

Currently unused. For compatibility with generic method.

Details

The state-dependent densities are weighted by the frequency of each state in the most probable state sequence (decoded with the function viterbi). For example, if the most probable state sequence indicates that one third of observations correspond to the first state, and two thirds to the second state, the plots of the densities in the first state are weighted by a factor 1/3, and in the second state by a factor 2/3.

Examples

# m is a moveHMM object (as returned by fitHMM), automatically loaded with the package
m <- example$m

plot(m,ask=TRUE,animals=1,breaks=20)


moveHMM documentation built on May 31, 2023, 6:13 p.m.