Displaying 1 result from an estimated 1 matches for "lag1diff2".
2010 Jul 31
1
Lags and Differences of zoo Objects
...ng the order of the difference.
What does the above line actually mean? I've tried a few settings on sample
data but can't figure out what it is doing.
x <- iris
x$Species = NULL
x$Petal.Width = NULL
x$Sepal.Width = NULL
x$Sepal.Length = NULL
x <- zoo(x)
x <-
merge(orig = x
,lag1diff2 = diff(x, lag = 1, differences = 2, arithmetic = TRUE, na.pad =
TRUE)
,lag2diff1 = diff(x, lag = 2, differences = 1, arithmetic = TRUE, na.pad =
TRUE)
,lag2diff2 = diff(x, lag = 2, differences = 2, arithmetic = TRUE, na.pad =
TRUE)
)
head(x)
--
View this message in context: http://r.789695.n4.na...