Delay {EmiStatR} | R Documentation |
Delay function for time series
Description
This function allows to cretae a n-time steps delayed time series, where n is the number of time steps defined by argument x
.
Henceforth, it is possible to calibrate this argument (parameter) x
.
Usage
Delay(P1, x)
Arguments
P1 |
A |
x |
A |
Value
A data.frame
with two columns:
time |
the date-time time series of the delayed variable |
value |
time series with the magnitude (equal to the original, |
Author(s)
J.A. Torres-Matallana
Examples
library(EmiStatR)
data(P1)
P1_delayed <- Delay(P1 = P1, x = 500)
head(P1_delayed)
dev.new()
par(mfrow = c(2, 1))
plot(P1[,1], P1[,2], typ = "l", col = "blue")
plot(P1_delayed[,1], P1_delayed[,2], typ= "l", col = "red")