Compute a data frame with offset (lag and/or lead) observation vectors
1 2 3 | compute_offset_obs_vecs(data, filter_control, phi, vars_and_offsets, time_name,
leading_rows_to_drop = 0, trailing_rows_to_drop = 0,
additional_rows_to_drop = NULL, na.action = "na.omit")
|
data |
a data frame |
vars_and_offsets |
a named list: The component name matches the name of one of the variables in data, and the component value is an integer vector of lags to include for that variable |
leading_rows_to_drop |
an integer specifying the number of leading rows to drop. This will typically be the largest lag used, but could be larger for example if we are in the process of searching lags to determine which ones to include. Then for example if our search is for lags up to 52, we would want to set leading_rows_to_drop = 52. |
trailing_rows_to_drop |
an integer specifying the number of trailing rows to drop. This will typically be the largest prediction horizon used. |
additional_rows_to_drop |
an integer vector specifying indices of additional rows to drop. For example, if we are performing cross-validation, we might want to drop all rows within +/- 52 indices of the current prediction target. |
rows_to_drop |
an integer vector specifying rows to drop after computing lagged observation vectors. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.