All functions |
|
---|---|
Internal function that calculates the inverted cumsum |
|
Internal function that samples z1 aggregate |
|
This function helps store z from all iterations after burn in |
|
Internal function that generates nmat matrix to help with multinomial draws |
|
Assign behavior estimates to observations |
|
Add segment numbers to observations |
|
Internal function that adds segment numbers to observations |
|
Internal function that runs RJMCMC on a single animal ID |
|
Internal function that transforms a vector of bin numbers to a presence-absence matrix |
|
Cluster observations into behavioral states |
|
Cluster time segments into behavioral states |
|
Convert data frame to a list by animal ID |
|
Discretize movement variables |
|
Expand behavior estimates from track segments to observations |
|
Extract behavior proportion estimates for each track segment |
|
Filter observations for time interval of interest |
|
Find changes for integer variable |
|
Internal function to calculate the log-likelihood for iteration of mixture model |
|
Internal function to calculate theta parameter |
|
Find the maximum a posteriori (MAP) estimate of the MCMC chain |
|
Extract bin estimates from Latent Dirichlet Allocation or mixture model |
|
Extract breakpoints for each animal ID |
|
Internal function that calculates the sufficient statistics for the segmentation model |
|
Insert NA gaps to regularize a time series |
|
Internal function that calculates the log marginal likelihood of each model being compared |
|
Plot breakpoints over a time series of each movement variable |
|
Internal function for plotting breakpoints over each of the data streams |
|
Calculate step lengths, turning angles, net-squared displacement, and time steps |
|
Internal function to calculate step lengths, turning angles, and time steps |
|
Internal function that samples z's from a categorical distribution |
|
Internal function that samples z's from a multinomial distribution |
|
Round time to nearest interval |
|
Internal function for the Gibbs sampler within the reversible-jump MCMC algorithm |
|
Internal function to sample the gamma hyperparameter |
|
Internal function to sample bin estimates for each movement variable |
|
Internal function to sample bin estimates for each movement variable |
|
Internal function to sample parameter for truncated stick-breaking prior |
|
Internal function to sample parameter for truncated stick-breaking prior |
|
Internal function to sample latent clusters |
|
Internal function to sample latent clusters (for observations) |
|
Segmentation model to estimate breakpoints |
|
Dynamically explore tracks within Shiny app |
|
Internal function that summarizes bin distributions of track segments |
|
Summarize observations within bins per track segment |
|
View trace-plots of output from Bayesian segmentation model |
|
Simulated set of three tracks. |
|
Tracks discretized and prepared for segmentation. |
|
Segmented tracks for all IDs. |