create_var_model
Create and start fitting a long-term vector autoregressive (VAR) model to capture joint dynamics of multiple series and produce long-run elasticity estimates for marketing mix modeling.
Instructions
Create and start fitting a long-term (VAR) model (#569).
VAR models capture the joint dynamics of several series (e.g. sales and
brand-equity metrics) and produce the long-run elasticity bridge behind
the MMM's long_run_rollup results section. Fit one, then link it to an
MMM with link_var_model.
Args: uploaded_file_id: Dataset id from upload_data (must contain every named column). date_column: Date column name. Cannot also be a series. endogenous_vars: At least two column names — the jointly-modeled series. exogenous_vars: Optional outside drivers; must not overlap the endogenous set. lags: VAR order (>= 1). The dataset needs at least lags + 10 rows with no missing values across the modeled columns. forecast_horizon: Periods forecast for diagnostics (default 12). base_variable: The outcome series (must be endogenous) long-run multipliers are measured against. Required for long-run effects. equity_variables: Endogenous columns (excluding the base) whose long-run IRF multipliers are estimated. Required for long-run effects. lre_horizon: Long-run effects horizon in periods (default 156). lre_ci: Credible-interval mass for the effects table, in (0, 1). var_priors: Advanced prior overrides (lag_coefs / alpha / coefs / noise_chol); unknown keys are rejected. name: Display name for the created model, honoured verbatim (#575). Falls back to a generated API_VAR_* string when omitted.
Returns 202-style payload with model_hash; poll get_model_status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lags | No | ||
| name | No | ||
| lre_ci | No | ||
| var_priors | No | ||
| date_column | Yes | ||
| lre_horizon | No | ||
| base_variable | No | ||
| exogenous_vars | No | ||
| endogenous_vars | Yes | ||
| equity_variables | No | ||
| forecast_horizon | No | ||
| uploaded_file_id | Yes |