Moving Window SearchSource:
Calculate Gamma values for a window moving through the data.
moving_window_search( predictors, target, window_size = 40, by = 1, plot = TRUE, caption = "", show = "Gamma" )
A Numeric vector or matrix whose columns are proposed inputs to a predictive function
A Numeric vector, the output variable that is to be predicted
Integer width of the window that will move through the data
The increment between successive window starts
Logical, set this to FALSE if you don't want the plot
Character string, caption for plot
Character string, if it equals "vratio", vratios will be plotted, otherwise Gamma is plotted
An invisible data frame containing starting and ending positions of each window with its associated gamma
This is used for data sets that are ordered on one or more dimension, such as time series or spatial data. The search slides a window across the data set, calculating gamma for the data at each step. A change in causal dynamics will appear as a spike in gamma when the causal discontinuity is in the window.
he <- embed(henon_x, 13) t <- he[ , 1] p <- he[ ,2:13] moving_window_search(p, t, by = 5, caption = "my data")