hashem wrote:I need to estimate a VARMA for 7 variables with one lag in both the var and ma components how do adjust the varmadlm code?
The two procedures have the same basic structure:
* VARMADLMSetup(p,q,n) is called first. p and q are the standard AR and
* MA counts. n is the number of endogenous variables.
*
* VARMADLMInit(p,q,n) is used as a "STARTUP" formula for DLM. Add an
* option like STARTUP=VARMADLMInit(p,q,n) to the DLM instruction.
So for a vector ARMA(1,1) on seven variables you need to use
- Code: Select all
compute VARMADLMSetup(1,1,7)
nonlin(parmset=varmaparms) phi(1) theta(1) sigma
The estimation instruction is
- Code: Select all
dlm(startup=varmadlminit(1,1,7),a=%%dlma,f=%%dlmf,c=%%dlmc,sw=sigma,$
y=||<<list of your dependent variables separated by commas>>||,presample=ergodic,$
parmset=varmaparms,$
pmethod=simplex,piters=5,method=bfgs,iters=500) <<start>> <<end>> states
where anything in <<...>> needs to be adapted to your data set.