Description Details Author(s) References Examples
A collection of functions that allows one to perform the behavioral change point analysis (BCPA) as described by Gurarie et al. (2009, Ecology Letters, 12: 395408). The key features are estimation of discrete changes in timeseries data, notable linear and turning components of gappy velocity times series extracted from movement data.
There is a fairly detailed vignette accesible by entering vignette("bcpa")
. Alternatively, the key analysis function is WindowSweep
, and reading its documentation is a good way to start using this package. This function uses a suite of functions that might also be useful for more narrow analysis, listed hierarchically (from bottomup) below:
GetRho  maximizes the likelihood to estimate autocorrelation rho or characteristic timescale tau. 
GetDoubleL  estimates the paramters and returns the loglikelhood at either side of a given break 
GetBestBreak  finds the single best change point according to the likelihood returned by GetDoubleL 
GetModels  uses a (modified) BIC model selection for all combinations from M0 (μ_1 = μ_2, σ_1 = σ_2, ρ_1 = ρ_2) to M7 (μ_1 \neq μ_2, σ_1 \neq σ_2, ρ_1 \neq ρ_2) to characterize the "Best Break" 
WindowSweep  sweeps a longer time series with the Best Break / Model Selection analysis, identifying most likely break points and BIC selected models across the time series. 
Summary, diagnostic, and plotting functions are:
PartitionParameters  outputs the estimated parameters of a bcpa. 
ChangePointSummary  provides a summary table of the chage points. 
plot.bcpa  a plotting method for visualizing the time series with vertical lines as change points. 
PathPlot  a method for drawing a colorcoded track of the analysis. 
DiagPlot  diagnostic plots for BCPA. 
A few preprocessing functions available:
plot.track  method for plotting a generic "track" object. 
GetVT  returns steplenghts, absolute and turning angles from track data. 
Package:  bcpa 
Type:  Package 
Version:  1.0 
Date:  20131023 
License:  Unlimited 
LazyLoad:  yes 
This is a suite of functions needed to perform a complete behavioral change point analysis.
Eliezer Gurarie <eliezg@uw.edu>
Gurarie, E., R. Andrews and K. Laidre. 2009. A novel method for identifying behavioural changes in animal movement data. Ecol. Lett. 12: 395408.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  # Running through a complete analysis here:
## loading the data
data(Simp)
## plotting the track (using the plot.track method)
plot(Simp)
## Obtaining the movement summary table (with turning angles and step lengths)
Simp.VT < GetVT(Simp)
## Applying the analysis
Simp.ws < WindowSweep(Simp.VT, "V*cos(Theta)", windowsize = 50, windowstep = 1, progress=TRUE)
## plotting outpots
plot(Simp.ws, threshold=7)
plot(Simp.ws, type="flat", clusterwidth=3)
PathPlot(Simp, Simp.ws)
PathPlot(Simp, Simp.ws, type="flat")
## Diagnostic of assumptions
DiagPlot(Simp.ws)

Loading required package: Rcpp
Loading required package: plyr

  0%

=====  7%

=========  14%

==============  20%

===================  27%

========================  34%

============================  41%

=================================  47%

======================================  54%

===========================================  61%

===============================================  68%

====================================================  74%

=========================================================  81%

=============================================================  88%

==================================================================  95%
Warning message:
In plot.xy(xy.coords(x, y), type = type, ...) :
plot type 'black' will be truncated to first character
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.