hello,
In simulating a VAR(2) model (y=(x,z)'), the variable x depends on his own lags and the lags of the variable z; and the same whith z.
the problem is that when I generated the first equation
x=a11*x(-1)+a12*z(-1)+u1
eviews don't know the values of z; so I obtain "NA" as a result of coefficients estimated of the serie x.
Please who knows if there is an option or a command to generate the 2 equations of the model simultaneously
x=a11*x(-1)+a12*z(-1)
z=a21*x(-1)+a22*z(-1)
thanks.
VAR model
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
Re: VAR model
You can start the simulation from the second observation via adjusting the sample:
Code: Select all
smpl 2 @lastRe: VAR model
but the problem is that when we simulate x in the first time, x depends on z which is not known; and the same thing whith z. So there is a command that I should write before the 2 équations in order to simulate them (x=a11*x(-1)+a12*z-1)+u1 et z=a21*x(-1)+a22*z(-1)+u2)
Re: VAR model
That is the point of simulation. You should supply the initial values.
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: VAR model
The problem is a that given initial values, EViews will roll forward one equation but won't run forward two equations in tandem.
Can this be solved with the model object?
Can this be solved with the model object?
Re: VAR model
I automatically assumed that simulation is carried out through a program, which I believe is the safest way...
Re: VAR model
And yes, I believe it is possible to do something like that via the model object. Equations can be defined as a text and the values then can be generated the within context of stochastic simulation with dynamic option. I think, it is also necessary to explicitly assign a standard deviation to each equation. I will give it a try, it is an interesting suggestion indeed...
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: VAR model
I think Startz was just pointing out that if you have the following program:
The only downside to the model approach is that the results would be in Y_0 and X_0 rather than Y and X.
Code: Select all
series y = 3+0.2*x(-1)
series x = 4+0.1*y(-1)
[code]
EViews will generate all of the Ys, and then all of the Xs, rather than generating the first Y, then the first X, then the second Y, then the second X, etc..., so you won't get the interaction happening properly.
There are two solutions. Either run a for loop to loop through the observations and set Y and X each time, or use a model. When you solve a model, it generates the solutions observation by observation:
[code]
model m
m.append series y = 3+0.2*x(-1)
m.append series x = 4+0.1*y(-1)
m.solve
Re: VAR model
thanks a lot. I obtain the simulation via the model object.
Please I have an other question.
for the VAR representation y=(x,z)'=A*y(-1)+u where u is normally distributed, the 2 equations to simulate are:
x=0.2*x(-1)+0.3*z(-1)+u1
z=0.1*x(-1)+0.7*z(-1)+u2
Shall I use the same parameters for the normal distribution of the error terms u1 and u2
genr u1=0.35*nrnd
genr u2=0.35*nrnd
or different parameters for each distribution
genr u1=0.35*nrnd
genr u2=2+0.5*nrnd
Thanks for your help.
Please I have an other question.
for the VAR representation y=(x,z)'=A*y(-1)+u where u is normally distributed, the 2 equations to simulate are:
x=0.2*x(-1)+0.3*z(-1)+u1
z=0.1*x(-1)+0.7*z(-1)+u2
Shall I use the same parameters for the normal distribution of the error terms u1 and u2
genr u1=0.35*nrnd
genr u2=0.35*nrnd
or different parameters for each distribution
genr u1=0.35*nrnd
genr u2=2+0.5*nrnd
Thanks for your help.
Who is online
Users browsing this forum: No registered users and 2 guests
