VADD Instruction |
VADD( options ) newseries LAGS list of lags
VADD( options ) newseries
Adds a variable or its lags to the EQUATION being modified. MODIFY is needed to start the modification. The coefficients on the new variables are set to zero. Use VREPLACE rather than VADD to replace rather than add a variable.
Parameters
|
newseries |
The series you want to add to the equation. Use the variable name %MVGAVGE to add moving average lags. |
|
list of lags |
The lags of newseries to add to the equation. Use the second form (without the keyword LAGS or the list of lags) if you just want to add the zero lag. |
Option
PRINT/[NOPRINT]
If PRINT, print modified equation.
Examples
linreg(define=gdpeq) gdp
# constant gdp{1} m1{0 to 3}
modify gdpeq
vadd %mvgavge lags 1 2
iterate gdpeq
estimates an equation by OLS, then adds two moving average lags and re-estimates it using ITERATE.
do i=1,%nvar
modify %modeleqn(basevar,i) garchmeqns(i)
vadd hoil
compute bvec(i)=%eqncoeffs(garchmeqns(i))
compute garchp(i)=||%sigma(i,i)/5.0,.20,.60||
end do i
To a set of existing equations from a model, this adds the HOIL regressor to each. The original coefficients won't be altered, and HOIL will come in with a zero coefficient. This can then be used for non-linear estimation of the expanded model.
Copyright © 2025 Thomas A. Doan