Skip to contents

Compute the marginal probability map from a graph. The computation uses the forward backward algorithm. For more details, see section 2.3.2 of Nussbaumer et al. (2023b) and the GeoPressureManual.

Usage

graph_marginal(graph, quiet = FALSE)

Arguments

graph

a GeoPressureR graph with defined movement model graph_set_movement().

quiet

logical to hide messages about the progress.

Value

A GeoPressureR map of the marginal probability for each stationary period (stationary periods not modelled have no data). Each modelled stationary period is normalised to a probability map and all maps are then scaled by their overall maximum so that they can be compared visually. Best to include within tag.

References

Nussbaumer, Raphaël, Mathieu Gravey, Martins Briedis, Felix Liechti, and Daniel Sheldon. 2023. Reconstructing bird trajectories from pressure and wind data using a highly optimized hidden Markov model. Methods in Ecology and Evolution, 14, 1118–1129 doi:10.1111/2041-210X.14082 .

Examples

# Load a tag with pressure and light likelihood maps computed with `geopressuretemplate()`
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
  tag <- load_interim("18LX", var = "tag")
})

# Create graph
graph <- graph_create(tag, quiet = TRUE)

# Define movement model
graph <- graph_set_movement(graph)

# Compute marginal
marginal <- graph_marginal(graph, quiet = TRUE)

plot(marginal)