# bayesmove v0.1.0

Monthly downloads

## Non-Parametric Bayesian Analyses of Animal Movement

Methods for assessing animal movement from telemetry and biologging
data using non-parametric Bayesian methods. This includes features for pre-
processing and analysis of data, as well as the visualization of results
from the models. This framework does not rely on standard parametric density
functions, which provides flexibility during model fitting.

## Readme

# bayesmove

## Introduction

The goal of **bayesmove** is to analyze animal movement using a
non-parametric Bayesian framework, which addresses a number of
limitations of existing segmentation methods and state-space models.
This framework allows the analysis of multiple telemetry and biologging
data streams, which must be discretized into a set of bins before they
can be analyzed. This package also includes features to check model
convergence. Model output are often returned in a format that is
`tidyverse`

-friendly, which allows for easy visualization using
`ggplot2`

.

## Installation

You can install the latest CRAN release with:

```
install.packages("bayesmove")
```

You can install the latest **stable** version of the package from GitHub
with:

```
# install.packages("remotes")
remotes::install_github("joshcullen/bayesmove")
```

## Support

If you are receiving errors from the model output that you believe to be bugs, please report them as issues in the GitHub repo. Additionally, if there are any other features you would like added to this package, please submit them to the issue tracker.

## Functions in bayesmove

Name | Description | |

behav_seg_image | Internal function that transforms a vector of bin numbers to a presence-absence matrix | |

assign_behavior | Assign behavior estimates to observations | |

df_to_list | Convert data frame to a list by animal ID | |

assign_tseg_internal | Internal function that adds segment numbers to observations | |

CumSumInv | Internal function that calculates the inverted cumsum | |

discrete_move_var | Discretize movement variables | |

cluster_segments | Cluster time segments into behavioral states | |

behav_gibbs_sampler | Internal function that runs RJMCMC on a single animal ID | |

assign_tseg | Add segment numbers to observations | |

SampleZAgg | Internal function that samples z1 aggregate | |

get_breakpts | Extract breakpoints for each animal ID | |

prep_data | Calculate step lengths, turning angles, and time steps | |

prep_data_internal | Internal function to calculate step lengths, turning angles, and time steps | |

get_summary_stats | Internal function that calculates the sufficient statistics for the segmentation model | |

get_MAP | Find the maximum a posteriori (MAP) estimate of the MCMC chain | |

%>% | Pipe operator | |

log_marg_likel | Internal function that calculates the log marginal likelihood of each model being compared | |

get.theta | Internal function to calculate theta parameter | |

tracks.seg | Segmented tracks for all IDs. | |

get_behav_hist | Extract bin estimates from Latent Dirichlet Allocation model | |

get_MAP_internal | Internal function to find the maximum a posteriori (MAP) estimate of the MCMC chain | |

plot_breakpoints | Plot breakpoints over a time series of each movement variable | |

summarize_tsegs | Summarize observations within bins per track segment | |

plot_breakpoints_behav | Internal function for plotting breakpoints over each of the data streams | |

rmultinom1 | Internal function that samples z's from a categorical distribution | |

sample.phi | Internal function to sample bin estimates for each movement variable | |

sample.v | Internal function to sample parameter for truncated stick-breaking prior | |

traceplot | View trace-plots of output from Bayesian segmentation model | |

rmultinom2 | Internal function that samples z's from a multinomial distribution | |

tracks | Simulated set of three tracks. | |

expand_behavior | Expand behavior estimates from track segments to observations | |

extract_prop | Extract behavior proportion estimates for each track segment | |

filter_time | Filter observations for time interval of interest | |

tracks.list | Tracks discretized and prepared for segmentation. | |

round_track_time | Round time to nearest interval | |

find_breaks | Find changes for integer variable | |

sample.z | Internal function to sample latent clusters | |

samp_move | Internal function for the Gibbs sampler within the reversible-jump MCMC algorithm | |

segment_behavior | Segmentation model to estimate breakpoints | |

No Results! |

## Last month downloads

## Details

Type | Package |

License | GPL-3 |

Encoding | UTF-8 |

LazyData | true |

URL | https://github.com/joshcullen/bayesmove, https://joshcullen.github.io/bayesmove/ |

BugReports | https://github.com/joshcullen/bayesmove/issues |

Language | en-US |

RoxygenNote | 7.1.1 |

LinkingTo | Rcpp, RcppArmadillo |

NeedsCompilation | yes |

Packaged | 2020-10-09 01:32:23 UTC; joshcullen |

Repository | CRAN |

Date/Publication | 2020-10-16 14:10:02 UTC |

suggests | covr , ggforce , knitr , RcppArmadillo , rmarkdown , spelling , testthat |

imports | dplyr (>= 0.8.3) , furrr (>= 0.1.0) , future (>= 1.15.1) , ggplot2 (>= 3.3.0) , lubridate (>= 1.7.4) , magrittr , MCMCpack (>= 1.4.5) , progress (>= 1.2.2) , purrr (>= 0.3.3) , Rcpp , rlang , tictoc (>= 1.0) , tidyr (>= 1.0.0) |

depends | R (>= 3.6.0) |

Contributors | Denis Valle |

#### Include our badge in your README

```
[![Rdoc](http://www.rdocumentation.org/badges/version/bayesmove)](http://www.rdocumentation.org/packages/bayesmove)
```