Fitting a VAR with Trend Terms Through Multivariate Regression
Summary
The document considers how to estimate a vector autoregression that includes a constant, a deterministic linear time trend, lagged variables, and cross-factor effects. The responses suggest that the model can be expressed as a multivariate linear regression by arranging the response and explanatory variables into matrices, rather than relying on a built-in VAR fitting command that lacks the desired trend option.
One answer points to Matlab’s multivariate regression routine as a way to handle the system, while another recommends constructing the matrices and using ordinary regression commands directly. The discussion cautions that a linear time trend can be fragile because its effect depends on the chosen time origin. It provides implementation direction but no worked dataset, diagnostic procedure, or empirical comparison of the approaches; the regression suggestion also assumes an appropriate error metric and distributional setup.
Key ideas
- A VAR with a constant, trend, and lagged cross-factor terms can be organized as a multivariate regression.
- Arrange response variables and explanatory variables into matrices before estimation.
- Matlab’s multivariate regression tools or manually assembled regressions can provide an alternative to a VAR command without trend support.
- A deterministic time trend may be sensitive to the chosen starting point for time.
Tags
Full text
# Fit Simple VAR model in Matlab
# Fit Simple VAR model in Matlab
I've been trying to fit the following model in Matlab:
$\beta_{t}=a+Mt+A\beta_{t-1}+\epsilon_{t}$
Where a is a constant, M is a vector of trend parameters and A a cross-factor interaction matrix. I've been looking at vgxset but it doesn't have the option to add a trend estimation.
Any ideas? Thanks,
## Answer by lehalle (score 0, accepted)
https://quant.stackexchange.com/a/28281
First of all I would not recommend the $M\cdot t$; it is fragile to the choice of $t_0$, isn't it?
Nevertheless your specification seems to be close to the one of a linear regression (if $\epsilon$ is Gaussian and you metric is the Mahalanobis' one): just organize your dataset as a nice matrix and perform a linear regression.
## Answer by Dave92 (score 1)
https://quant.stackexchange.com/a/30160
I suggest you to organize you explanatory variables in different matrix and then use the `mvregress(...)` command, that allows you to handle well the results.
I tried in the past to use pre-built command for VAR but I find way simpler to organize it by myself and use usual regression commands.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.