bin_cor {BINCOR} | R Documentation |
Binned correlation
Description
The bin_cor
function convert an irregular time series to
a binned one and its parameters are described in the following lines.
Usage
bin_cor(ts1, ts2, FLAGTAU=3, ofilename)
Arguments
ts1 , ts2 |
ts1 and ts2 are the unevenly spaced time series. |
FLAGTAU |
FLAGTAU defines the method used to estimate the persistence or memory of
the unevenly spaced time series. Options (by default is 3): |
ofilename |
The output filename (ASCII format) containing the binned time series. |
Details
The bin_cor
function convert an irregular times series to
a binned time series and depends on the R dplR package to carry
out this task. dplR (redfitTauest function) estimate the
persistence contained in the irregular climate time series by means of
the method of Mudelsee (2002).
Value
A list of 16 elements:
Binned_time_series |
An object containing the binned time series. |
Auto._cor._coef._ts1 |
The autocorrelation for the binned time series number 1. |
Persistence_ts1 |
The persistence or memory for the binned time series number 1. |
Auto._cor._coef._ts2 |
The autocorrelation for the binned time series number 2. |
Persistence_ts2 |
The persistence or memory for the binned time series number 2. |
bin width |
The bin width. |
Number_of_bins |
The number of bins. |
Average spacing |
The mean value of the times for the binned time series. |
VAR. ts1 |
Variance of ts1 |
VAR. bin ts1 |
Variance of the binned ts1. |
VAR. ts2 |
Variance for ts2. |
VAR. bin ts2 |
Variance of the binned ts2. |
VAR. ts1 - VAR bints1 |
Variance of ts1 minus variance of the binned ts1. |
VAR. ts2 - VAR bints2 |
Variance of ts2 minus variance of the binned ts2. |
% of VAR. lost ts1 |
Percentage of variance lost for ts1. |
% of VAR. lost ts2 |
Percentage of variance lost for ts2. |
Note
Needs dplR (redfitTauest function) to estimate the persistence contained in the irregular time series by means of the method of Mudelsee (2002). Please, look at the code tauest_dplR.R in the directory R of our BINCOR package.
Author(s)
Josué M. Polanco-Martínez (a.k.a. jomopo).
BC3 - Basque Centre for Climate Change, Bilbao, SPAIN.
EPOC UMR CNRS 5805 - U. de Bordeaux, Pessac, FRANCE.
Web1: https://scholar.google.es/citations?user=8djLIhcAAAAJ&hl=en.
Web2: http://www.researchgate.net/profile/Josue_Polanco-Martinez.
Email: josue.m.polanco@gmail.com
References
Bunn, A., Korpela, M., Biondi, F., Campelo, F., Mérian, P., Qeadan, F.,
Zang, C., Buras, A., Cecile, J., Mudelsee, M., Schulz, M. (2015).
Dendrochronology Program Library in R. R package version 1.6.3.
URL https://CRAN.R-project.org/package=dplR.
Mudelsee, M. (2002). TAUEST: A computer program for estimating persistence
in unevenly spaced weather/climate time series. Computers & Geosciences 28
(1), 69–72.
URL http://www.climate-risk-analysis.com/software/.
Mudelsee, M. (2010). Climate Time Series Analysis: Classical Statistical and
Bootstrap Methods. Springer.
Mudelsee, M. (2014). Climate Time Series Analysis: Classical Statistical and
Bootstrap Methods, Second Edition. Springer.
Polanco-Martínez, J.M., Medina-Elizalde, M.A., Sánchez Goñi, M.F., M. Mudelsee. (2018). BINCOR: an R package to estimate the correlation between two unevenly spaced time series. Ms. under review (second round).
Examples
#####################################################################
#:: Figure 1 D (Polanco-Martínez et al. (2018), (mimeo)).
#####################################################################
library("BINCOR")
#####################################################################
#:: Loading the time series under analysis: example 1 (ENSO vs. NHSST)
#####################################################################
data(ENSO)
data(NHSST)
#####################################################################
# Testing our bin_cor function
#####################################################################
bincor.tmp <- bin_cor(ENSO.dat, NHSST.dat, FLAGTAU=3, "output_ENSO_NHSST.tmp")
binnedts <- bincor.tmp$Binned_time_series