Data Transformation: Differencing Detrending of Zoo Time Series
Source:R/transformations.R
f_detrend_difference.Rd
Differencing detrending via diff()
. Returns randomm fluctuations from sample to sample not related to the overall trend of the time series.
See also
Other tsl_transformation:
f_center()
,
f_detrend_linear()
,
f_hellinger()
,
f_list()
,
f_pca()
,
f_percentage()
,
f_proportion()
,
f_rescale()
,
f_scale()
,
f_slope()
,
f_smooth_window()
,
f_trend_linear()
Examples
x <- zoo_simulate(cols = 2)
y_lag1 <- f_detrend_difference(
x = x,
lag = 1
)
y_lag5 <- f_detrend_difference(
x = x,
lag = 5
)
if(interactive()){
zoo_plot(x)
zoo_plot(y_lag1)
zoo_plot(y_lag5)
}