This project introduces a sliding window analysis function for the ctmm
R package.
- Flexible sliding window analysis for time-series data.
- Extracts point estimates and uncertainty measures for selected variables.
- Customizable window size and time step options.
- Visualization tools for intuitive time-series plots.
- Compatible with the
ctmm
package's existing framework.
- R
- The
ctmm
package installed.
Clone the repository and set up the environment:
git clone https://github.com/ctmm-initiative/window.git
cd window
- data (tracking data of ctmm class)
- variable (calculates parameter estimate : "area", "diffusion", "velocity")
- dt.min (minimum time step between Time series windows as difftime object)
- window (window size as difftime object)
- select (More rigorous method for selecting movement model by default. For faster modeling fitting make select = FALSE)
- recycle (Option to use the previous model fit as a starting point for the next model fitting process in the timeseries)
Create an object of class TS using the animal tracking data, and then use plot() to visualize the TS object
library(ctmm)
# Download Data
data(buffalo)
Data <- buffalo$Cilla
# Create TS (Timeseries) object using sliding_window()
min_time_step <- as.difftime(10, units = "days")
window <- as.difftime(10, units = "days")
results <- sliding_window(data = Data, window = window, dt.min = min_time_step, recycle = TRUE)
#plot results
plot(results)
- This project was developed by Michael Garan under the guidance of Dr. Christen Fleming.
For questions or feedback, contact:
Michael Garan
Email: [email protected]