
Vector Autoregression with Exogenous Variables (VARX) Model Estimation
Source:R/RcppExports.R
fVARX.RdEstimates a VARX(p) model where both endogenous and exogenous variables are lagged using ordinary least squares (OLS). Optimised for maximum speed and memory efficiency.
Arguments
- y
A numeric matrix of endogenous time series data with T rows (time periods) and N columns (variables).
- ex
A numeric matrix of exogenous time series data with T rows (time periods) and M columns (variables).
- p
An integer specifying the number of lags for both endogenous and exogenous variables.
- c
An integer indicator for including a constant term (1 = include intercept, 0 = no intercept).
Value
A list with two elements: beta — coefficient matrix of dimensions (Np + M + Mp + c) x N; residuals — (T-p) x N residual matrix.