concat | R Documentation |
The aim of this code is to provide, from a set of multiple time series, a single concatenated time series for applying the global modeling technique to all the time time series in association.
concat(svrlTS, winL = 9)
svrlTS |
All separated time series. |
winL |
Total number of points used for computing the derivatives
of the input time series. This parameter will be used as an
input in function |
concaTS
The concatenated time series.
Sylvain Mangiarotti, Mireille Huc
S. Mangiarotti, F. Le Jean, M. Huc & C. Letellier, 2016. Global modeling of aggregated and associated chaotic dynamics, Chaos, Solitons & Fractals, 83, 82-96.
# load data
data("svrlTS")
# Concatenate the data set into a single time series
winL = 55
concaTS <- concat(svrlTS, winL = winL)
# Plot the concatenated time series
plot(concaTS$sglTS$TS[,1], concaTS$sglTS$TS[,2],
main = 'Concatenated time series',
xlab = 'Time (concatenated)', ylab = 'y(t)',
type = 'l', col = 'gray')
lines(concaTS$sglTS$TS[concaTS$sglTS$W == 1,1],
concaTS$sglTS$TS[concaTS$sglTS$W == 1,2], type = 'p', col = 'green', cex = 0.5)
lines(concaTS$sglTS$TS[concaTS$sglTS$W == 0,1],
concaTS$sglTS$TS[concaTS$sglTS$W == 0,2], type = 'p', col = 'red', cex = 0.5)
lines(concaTS$sglTS$TS[,1], concaTS$sglTS$W, type = 'l')
# The concatenated data set can be used for global modelling:
GPout1 <- gPoMo(data = concaTS$sglTS$TS[,2], tin = concaTS$sglTS$TS[,1],
dMax = 2, nS = 3, winL = winL, weight = concaTS$sglTS$W, show = 1,
IstepMin = 10, IstepMax = 6000, nPmin = 11, nPmax = 11, method = 'rk4')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.