Important notice (updated 2026-01-12)
A bug affecting the calculation of exploration percentages was present in this repository before commit 966dd74.
If you used this code before this date, your values for this metric may be inaccurate.
The methodology described in the paper is unchanged; this update only corrects the implementation in this repository.
Please update to the latest version and re-run the analysis if you rely on this metric.
Welcome to the repository for the project associated with the publication "Resolving anxiety-like behaviour inconsistencies in the elevated plus maze by tracking exploration depth and timing". This repository contains the code and data analysis tools used in the research.
Novel Exploration Growth (NEG) takes the theoretical motivations of approach and avoidance that underpin the conflict prompted by arenas like the Elevated Plus Maze and maps them to a single, coherent measure of anxiety-like behaviour. To understand this, consider a conventional measure such as time spent in the open arms. We break this into avoiding, exploring and preferencing the open arms, where exploration is the first visit to each part of the arms. The cumulative percentage of these naive visits is our new measure NEG:
Once we have the NEG time series, we can use the differences between arm types to infer the level of anxiety-like behaviour that is observed:
Click the preview image below to view an interactive visualisation of how phenotypical movements in the maze are mapped to the NEG by arm type and for the total maze
- analysis/: Current analysis workflows (Quarto documents)
NEG_Calc.qmd: Processes XY coordinate time series data into NEG time seriesMCP_Comp.qmd: Bayesian change-point analysis for phasic exploration patternsGAM_Reg.qmd: Bayesian GAM analysis for comparing effects of interest
- R/: Preprocessing functions and utilities
preprocess.R: Core preprocessing functions including coordinate alignment correction
- test_data/: Example datasets for testing and validation
- visualisations/: Interactive web-based visualisation demonstrating rodent behaviour patterns
- Images/: Figures and visualization assets
- legacy/v1/: Original implementation (deprecated)
- Pre-processing: Pre-process coordinates into Novel Exploration Growth over time
- Pre-processing includes a custom function that detects when XY coordinates for individual samples are not aligned with the origin (0,0) and uses a clustering algorithm to shift the location based on where the centre zone points are located
- Bayesian Change-point Analysis Localise change-points in each time series to evaluate the phasic nature of exploration
- This is completed primarily through the use of the mcp package
- Bayesian Generalised Additive Model Analysis Compare effects of interest using GAM models
Users will first process raw trial data, including shifting coordinates to ensure all trials overlap so that a grid can be created and utilised via analysis/NEG_Calc.qmd. The change points in the NEG time series will then be assessed via analysis/MCP_Comp.qmd to establish their phasic properties. Finally, the NEG time series will be analysed using either analysis/GAM_Reg.qmd or a generalised linear regression model with a binomial link family in brms (Frequentist alternatives using mgcv are also provided). Packages such as bayestestR and emmeans can then be used to estimate and visualise effects of interest.
For a more detailed workflow, see the publication below.
Each quarto document contains test data that can be processed in a chunk-by-chunk fashion or rendered as a HTML document (see NEG_Calc.html as an example).
- NEG_Calc.qmd uses test data stored in Excel spreadsheets similar to those generated from the Ethovision software
- MCP_Comp.qmd and GAM_Reg.qmd both use simulated data that mimics what is processed in NEG_Calc.qmd
If you use this code or find the results of our research helpful, please cite our publication:
Zelko, M.D., Robinson, S.R., Hill-Yardin, E.L. et al. Resolving anxiety-like behaviour inconsistencies in the elevated plus maze by tracking exploration depth and timing. Behav Res 57, 210 (2025). https://doi.org/10.3758/s13428-025-02738-8
- v2.0 (Current): Streamlined analysis workflows with improved preprocessing
- v1.0 (Legacy): Original implementation (archived in
legacy/v1/)
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or feedback, please open an issue in this repository or contact us at mattdzelko@gmail.com.


