View source: R/pf_analyse_path.R
pf_loglik | R Documentation |
This function calculates the total log-probability of each movement path reconstructed by a particle filtering (PF) algorithm, including the acoustic-container (AC), depth-contour (DC) or acoustic-container depth-contour (ACDC) algorithms.
pf_loglik(paths)
paths |
A dataframe containing movement paths from |
For each path, at each time step the probability associated with the sampled location depends on (a) the ‘intrinsic’ probability associated with each cell (assigned by the AC, DC or ACDC algorithm) and (b) a user-defined movement model that is driven by the distance between the sampled locations for the individual at the previous and current time steps (and other user-defined parameters). This function simply sums the logarithms of these probabilities for each path as a measure of their relative likelihood, given the movement model.
The function returns a dataframe with the log likelihood (‘loglik’) of each path (‘path_id’). Rows are ordered by log-probability and a ‘delta’ column is provided with the differences in log-probability between the most likely path and every other path.
Edward Lavender
# An example with the DCPF paths dataset included in flapper
pf_loglik(dat_dcpf_paths)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.