Overview
TimeHiVE provides efficient R functions for hierarchical moving-window analysis of coupled time series data. The toolkit implements:
- Parallel computation of Pearson and Mann-Kendall correlations
- Optimized O(n log n) implementations of statistical tests
- Customizable visualization of time-dependent relationships
- Statistical significance testing with adjustable thresholds
Installation
You can install the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("Ouroboro/TimeHiVE")
Usage
Basic Example
library(TimeHiVE)
# Generate example data
set.seed(123)
series1 <- sin(seq(0, 4*pi, length.out = 200)) + rnorm(200, sd = 0.2)
series2 <- cos(seq(0, 4*pi, length.out = 200)) + rnorm(200, sd = 0.3)
# Perform analysis
results <- TH_coupled(
series1 = series1,
series2 = series2,
m = 2,
s = 6,
alpha = 0.05,
mode = "both"
)
# Visualize results
TH_plotc(results, mask = TRUE, mode = "both")
Main Functions
-
TH_coupled()
: Perform hierarchical moving-window analysis -
TH_plotc()
: Visualize analysis results -
TH_MK_Corr()
: Mann-Kendall correlation test -
TH_MK_Trend()
: Mann-Kendall trend test
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin feature/your-feature
) - Open a Pull Request
License
This package is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.
Contact
For questions or issues, please contact:
Vladimiro Andrea Boselli
Email: boselli.v@irea.cnr.it
GitHub: @Ouroboro