VAR model with time varying coefficients

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

VAR model with time varying coefficients

Postby lisa » Thu Jul 28, 2011 4:30 pm

Good evening,
Please can I estimate a VAR model with time varying coefficients. For ex, a VAR(2) model
y(t)=A0(t)+ A1(t) y(t-1)+A2(t) y(t-2)+u(t)
have the state space form:
y(t)=X(t) B(t)+u(t)
B(t)=B(t-1)+v(t)
where: X(t)=(1*In, y'(t-1)*In, y'(t-2)*In)
B(t)=vec (A0(t),A1(t),A2(t))
* is the kronecker product
Please if any one know how to estimate this model help me.
Thanks a lot.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: VAR model with time varying coefficients

Postby startz » Thu Jul 28, 2011 4:55 pm

You'll need to read about setting up a State Space object.

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

Re: VAR model with time varying coefficients

Postby lisa » Thu Jul 28, 2011 5:12 pm

I know how to estimate an univariate model (for example an AR(2) with time varying coefficients) using a state space object but not a multivariate (VAR) one.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: VAR model with time varying coefficients

Postby startz » Thu Jul 28, 2011 5:42 pm

Add one signal equation for each endogenous variable, and the accompanying state equations for the time-varying coefficients.

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

Re: VAR model with time varying coefficients

Postby lisa » Fri Jul 29, 2011 3:05 am

The method is maximum likelihood estimation based on the kalman filter, so I think that I can't estimate the model equation by equation.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: VAR model with time varying coefficients

Postby startz » Fri Jul 29, 2011 6:53 am

The method is maximum likelihood estimation based on the kalman filter, so I think that I can't estimate the model equation by equation.
I'm afraid I don't understand.

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

Re: VAR model with time varying coefficients

Postby lisa » Fri Jul 29, 2011 7:42 am

Please can you give me some details; I'm really lost and I don't inderstand how to start.
It's urgent, I need the result as soon as possible.
Thank you again.

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: VAR model with time varying coefficients

Postby startz » Fri Jul 29, 2011 8:12 am

Why don't you show us the EViews state space model you'd use for a univariate model, say a VAR(2) with one endogenous variable, and maybe someone can show you how to extend it.

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

Re: VAR model with time varying coefficients

Postby lisa » Fri Jul 29, 2011 9:14 am

for an AR(2) model:
x(t)=a(t) x(t-1)+b(t) x(t-2)+u(t)
where: a(t)=a(t-1)+v(t)
b(t)=3 b(t-2)+w(t)
the program eviews is:
@signal x=a*x(-1)+b*x(-2)+[var=exp(c(1))]
@state a=a(-1)+[var=exp(c(2))]
@state b=3*b(-2)+[var=exp(c(3))]


It is possible to extend this program to estimate the VAR model?

startz
Non-normality and collinearity are NOT problems!
Posts: 3797
Joined: Wed Sep 17, 2008 2:25 pm

Re: VAR model with time varying coefficients

Postby startz » Fri Jul 29, 2011 9:35 am

for an AR(2) model:
x(t)=a(t) x(t-1)+b(t) x(t-2)+u(t)
where: a(t)=a(t-1)+v(t)
b(t)=3 b(t-2)+w(t)
the program eviews is:
@signal x=a*x(-1)+b*x(-2)+[var=exp(c(1))]
@state a=a(-1)+[var=exp(c(2))]
@state b=3*b(-2)+[var=exp(c(3))]


It is possible to extend this program to estimate the VAR model?
I tried your program in EViews and it doesn't run.
Nonetheless, you might try extensions along the lines of

Code: Select all

@signal x1=a11*x1(-1)+b11*x1(-2)+a21*x2(-1)+b21*x2(-2)+[var=exp(c(1))] @signal x2=a12*x1(-1)+b12*x1(-2)+a22*x2(-1)+b22*x2(-2)+[var=exp(c(1))]

lisa
Posts: 45
Joined: Thu Jul 28, 2011 3:27 pm

Re: VAR model with time varying coefficients

Postby lisa » Fri Jul 29, 2011 5:07 pm

thank you very much

SeaWill
Posts: 8
Joined: Fri May 03, 2013 3:03 pm

Re: VAR model with time varying coefficients

Postby SeaWill » Wed Feb 12, 2014 2:16 pm

I'm using eviews 7.2 to estimate a tvp-VAR. The suggestion to include multiple signals is giving me a near sigular matrix.
My code is as follows:

sspace sspace1

sspace1.append @PARAM C(1) -.004726 C(2) .026090 C(3) -.134251 C(4) .917922 C(5) .1 c(6) .159931

sspace1.append @signal Z9 = c(1)*Z9(-1) + c(2)*Z9(-2) + sv1*pc1n(-1) + sv2*pc1n(-2) + sv3*pc2n(-1) + sv4*pc2n(-2) + sv5*pc3n(-1) + sv6*pc3n(-2) + [ename = e1]
sspace1.append @signal pc1n = sv1*Z9(-1) + sv2*Z9(-2) + sv1*pc1n(-1) + sv2*pc1n(-2) + sv3*pc2n(-1) + sv4*pc2n(-2) + sv5*pc3n(-1) + sv6*pc3n(-2) + [ename = e1]
sspace1.append @signal pc2n = sv1*Z9(-1) + sv2*Z9(-2) + sv1*pc1n(-1) + sv2*pc1n(-2) + sv3*pc2n(-1) + sv4*pc2n(-2) + sv5*pc3n(-1) + sv6*pc3n(-2) + [ename = e1]
sspace1.append @signal pc3n = sv1*Z9(-1) + sv2*Z9(-2) + sv1*pc1n(-1) + sv2*pc1n(-2) + sv3*pc2n(-1) + sv4*pc2n(-2) + sv5*pc3n(-1) + sv6*pc3n(-2) + [ename = e1]

sspace1.append @state sv1 = c(3) + c(4)*sv1(-1) + [ename = e2]
sspace1.append @state sv2 = c(5) + c(6)*sv2(-1) + [ename = e3]
sspace1.append @state sv3 = c(7) + c(8)*sv3(-1) + [ename = e4]
sspace1.append @state sv4 = c(9) + c(10)*sv4(-1) + [ename = e5]
sspace1.append @state sv5 = c(11) + c(12)*sv5(-1) + [ename = e6]
sspace1.append @state sv6 = c(13) + c(14)*sv6(-1) + [ename = e7]

sspace1.append @evar cov(e2, e3, e4, e5, e6) = exp(c(15))
sspace1.append @evar var (e2) = exp(c(16))
sspace1.append @evar var (e3) = exp(c(17))
sspace1.append @evar var (e4) = exp(c(18))
sspace1.append @evar var (e5) = exp(c(19))
sspace1.append @evar var (e6) = 0.1


any suggestions?


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests