add_lag_column
Compute x(t)*x(t-lag), smooth it with a centered moving average, and append it as a named column to a target sheet to build lag matrices.
Instructions
Compute the lag-m correlation product x(t)*x(t-lag) of a series, smooth it with a centered moving average, and append it as a named column to a target sheet (builds the Month + Lag1..LagK matrix step by step).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lag | No | Correlation lag. Default 1. | |
| mode | No | product = x(t)*x(t-lag) (default), shift = x(t-lag). | |
| name | No | New column name. Default "Lag<lag>". | |
| save | No | Optional destination path to persist the result as .sta. | |
| sheet | No | Source sheet holding the series. | |
| attach | No | Attach to the already-running STATISTICA instance and edit it live (no new process, the app is not closed). | |
| smooth | No | Apply the centered moving average. Default true for product, false for shift. | |
| target | Yes | Target sheet to append the column to. | |
| window | No | Centered moving-average window. Default 12. | |
| variable | Yes | Source series. |