-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpf_loglik.Rd
27 lines (27 loc) · 1.73 KB
/
pf_loglik.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pf_analyse_path.R
\name{pf_loglik}
\alias{pf_loglik}
\title{Calculate the log-probability of movement paths from a PF algorithm}
\usage{
pf_loglik(paths)
}
\arguments{
\item{paths}{A dataframe containing movement paths from \code{\link[flapper]{pf}} plus \code{\link[flapper]{pf_simplify}} (see \code{\link[flapper]{pf_path-class}}). At a minimum, this should contain a unique identifier for each path (named `path_id') and the probability associated with each cell along each path (`cell_pr').}
}
\value{
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.
}
\description{
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.
}
\details{
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.
}
\examples{
# An example with the DCPF paths dataset included in flapper
pf_loglik(dat_dcpf_paths)
}
\author{
Edward Lavender
}