Plot moveHMM

Share:

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

1
2
3
4
## S3 method for class 'moveHMM'
plot(x, animals = NULL, ask = TRUE, breaks = "Sturges",
  hist.ylim = NULL, sepAnimals = FALSE, sepStates = FALSE, col = NULL,
  ...)

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.

hist.ylim

Parameter ylim for the step length histograms. See hist documentation. Default: NULL ; the function sets default values.

sepAnimals

If TRUE, the data is split by individuals in the histograms. Default: FALSE.

sepStates

If TRUE, the data is split by states in the histograms. Default: FALSE.

col

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

...

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

1
2
3
4
# 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)