Cointegration  exogenous variables
Moderators: EViews Gareth, EViews Moderator

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Cointegration  exogenous variables
Dear Eviews team
Eviews cannot handle exogenous variables in cointegrating relationships. As it is now, I use PcGive to find cointegrating relationships, and then estimate the full system in Eviews by entering these relationships manually. This is somewhat cumbersome. It would be much better if i could do all of my cointegration analysis in Eviews.
Would it be possible to add this functionality in Eviews?
Sincerely
Thomas von Brasch
Eviews cannot handle exogenous variables in cointegrating relationships. As it is now, I use PcGive to find cointegrating relationships, and then estimate the full system in Eviews by entering these relationships manually. This is somewhat cumbersome. It would be much better if i could do all of my cointegration analysis in Eviews.
Would it be possible to add this functionality in Eviews?
Sincerely
Thomas von Brasch

 EViews Developer
 Posts: 2646
 Joined: Wed Oct 15, 2008 9:17 am
Re: Cointegration  exogenous variables
Can you be a bit more precise about what you mean by "can't handle" and what it is you'd like us to add? Thanks...

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Dear Glenn,
and thanks for your reply.
In PcGive, the following procedure of cointegration is applied. Consider the system
yt=∑π_i y_(ti)+∑π_(m+j+1) z_(tj)+v_t for t=1,...,T, (eq:15.1)
Integrated systems can be transformed to equilibrium correction form, where all endogenous variables and their lags are transformed to differences, apart from the first lag:
Δyt=∑δ_i Δy_(ti)+P0 y_(t1)+∑π_(m+j+1) z_(tj)+v_t for t=1,...,T. (eq:15.2)
When the system is closed in the endogenous variables, express P0 in (eq:15.2) as αβ', where α and β are ( n×p) matrices of rank p. The rank p of P0 determines how many linear combinations of yt are stationary. The rank of P0 is estimated using the maximum likelihood method proposed by Johansen (1988), summarized here. First, partial out from Δyt and yt1 in (eq:15.2) the effects of the lagged differences ( Δyt1...Δytm+1) and any variables classified as unrestricted (usually the Constant or Trend, but any other variable is allowed as discussed below). This yields the residuals R0t and R1t respectively. Next compute the second moments of all these residuals, denoted S00, S01 and S11 where:
Sij= 1/T ∑t=1TRitRjt' for i, j=0,1. (eq:15.37)
Now solve λS11S10S001S01=0 for the p largest eigenvalues 1>λ̂ 1>...>λ̂ p...>λ̂ n>0 and the corresponding eigenvectors:
β̂ =( β̂ 1,...,β̂ p) normalized by β̂ 'S11β̂ =Ip. (eq:15.38)
The cointegrating combinations β'yt1 are the I(0) linear combinations of the I(1) variables which can be used as equilibrium correction mechanisms (ECMs).
Any nonendogenous variables zt can enter in two ways:
1. Unrestricted: they are partialled out prior to the ML procedure: denote these qu variables by zut.
2. Restricted: the qr variables zrt are forced to enter the cointegrating space, which can then be written as β'(yt1:zt1r), with β' now a (p×(n+qr)) matrix.
If I understand the Eviews manual correctly, it is not possible to restrict an exogenous variable to enter the cointegrating space, i.e., option 2. Is this correct ?
Sincerely
Thomas von Brasch
and thanks for your reply.
In PcGive, the following procedure of cointegration is applied. Consider the system
yt=∑π_i y_(ti)+∑π_(m+j+1) z_(tj)+v_t for t=1,...,T, (eq:15.1)
Integrated systems can be transformed to equilibrium correction form, where all endogenous variables and their lags are transformed to differences, apart from the first lag:
Δyt=∑δ_i Δy_(ti)+P0 y_(t1)+∑π_(m+j+1) z_(tj)+v_t for t=1,...,T. (eq:15.2)
When the system is closed in the endogenous variables, express P0 in (eq:15.2) as αβ', where α and β are ( n×p) matrices of rank p. The rank p of P0 determines how many linear combinations of yt are stationary. The rank of P0 is estimated using the maximum likelihood method proposed by Johansen (1988), summarized here. First, partial out from Δyt and yt1 in (eq:15.2) the effects of the lagged differences ( Δyt1...Δytm+1) and any variables classified as unrestricted (usually the Constant or Trend, but any other variable is allowed as discussed below). This yields the residuals R0t and R1t respectively. Next compute the second moments of all these residuals, denoted S00, S01 and S11 where:
Sij= 1/T ∑t=1TRitRjt' for i, j=0,1. (eq:15.37)
Now solve λS11S10S001S01=0 for the p largest eigenvalues 1>λ̂ 1>...>λ̂ p...>λ̂ n>0 and the corresponding eigenvectors:
β̂ =( β̂ 1,...,β̂ p) normalized by β̂ 'S11β̂ =Ip. (eq:15.38)
The cointegrating combinations β'yt1 are the I(0) linear combinations of the I(1) variables which can be used as equilibrium correction mechanisms (ECMs).
Any nonendogenous variables zt can enter in two ways:
1. Unrestricted: they are partialled out prior to the ML procedure: denote these qu variables by zut.
2. Restricted: the qr variables zrt are forced to enter the cointegrating space, which can then be written as β'(yt1:zt1r), with β' now a (p×(n+qr)) matrix.
If I understand the Eviews manual correctly, it is not possible to restrict an exogenous variable to enter the cointegrating space, i.e., option 2. Is this correct ?
Sincerely
Thomas von Brasch

 EViews Developer
 Posts: 161
 Joined: Wed Sep 17, 2008 10:39 am
Re: Cointegration  exogenous variables
You're right: we only allow you to enter one set of exogenous variables and we treat them as in your first case (they are partialled out before the reduced rank regression).
I can't think of any good reason for this, other than that the critical values we provide are simulated based on what is allowed into the reduced rank regression (i.e. trend/constant assumptions) and if you add your own exogenous variables inside the cointegrating relationship I think the critical values won't be strictly correct. We could always give you a warning to cover this though.
I'll add this to our list as something that we should look into next time we are working with the cointegration code.
I can't think of any good reason for this, other than that the critical values we provide are simulated based on what is allowed into the reduced rank regression (i.e. trend/constant assumptions) and if you add your own exogenous variables inside the cointegrating relationship I think the critical values won't be strictly correct. We could always give you a warning to cover this though.
I'll add this to our list as something that we should look into next time we are working with the cointegration code.

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Dear Chris,
and thanks for your reply. Do you think the option of restricting exogenous variables will be included in Eviews 8.0? I am working at Statistics Norway,and currently we are using Eviews 6.0 in our organisiation. I do not want to recommend upgrading the software until this function is installed. Can you say anything about when this will be done, and when Eviews 8.0 will be released?
Sincerely
Thomas von Brasch
and thanks for your reply. Do you think the option of restricting exogenous variables will be included in Eviews 8.0? I am working at Statistics Norway,and currently we are using Eviews 6.0 in our organisiation. I do not want to recommend upgrading the software until this function is installed. Can you say anything about when this will be done, and when Eviews 8.0 will be released?
Sincerely
Thomas von Brasch
Re: Cointegration  exogenous variables
Hello:)
Not sure if this is the right place to be asking this question, but it's the only thread that sort of addresses my problem.
In short, my problem is this:
I'm supposed to replicate in eViews a paper for which my professor used Microfit. I'm estimating a cointegrating VAR with 9 variables, 8 endogenous and the price of oil (PO) as an exogenous one. All 9 are I(1). The model in his paper requires PO to be in the cointegrating space and imposes restrictions on it.
After many frustrating hours of trying to figure out how to do this in eViews, I realised I can't, so I told my professor about this issue. His suggestion was to include d(PO) as an I(0) exogenous variable AND include PO as an endogenous variable, but restrict its loading coefficients in the VECM to be 0 and impose the restrictions on its betas as in the paper(they are 0, as well).
Not only does this mess up my results, my model specification and basically any output that eViews produces (in the sense that they are no longer similar to the paper I am supposed to replicate), but it 'feels' wrong. I know this is meant to allow PO to enter the cointegrating space, but not be affected by the other variables; however, I still have that nagging feeling that this is not right.
So, I'd appreciate it if someone could tell me their views on this or point me in the direction of a better solution. Perhaps also point me in the direction of some good material on VAR/VECM's with exogenous i(1) variables, because all I can find just seems to skim the surface of the issue.
Thank you.
Not sure if this is the right place to be asking this question, but it's the only thread that sort of addresses my problem.
In short, my problem is this:
I'm supposed to replicate in eViews a paper for which my professor used Microfit. I'm estimating a cointegrating VAR with 9 variables, 8 endogenous and the price of oil (PO) as an exogenous one. All 9 are I(1). The model in his paper requires PO to be in the cointegrating space and imposes restrictions on it.
After many frustrating hours of trying to figure out how to do this in eViews, I realised I can't, so I told my professor about this issue. His suggestion was to include d(PO) as an I(0) exogenous variable AND include PO as an endogenous variable, but restrict its loading coefficients in the VECM to be 0 and impose the restrictions on its betas as in the paper(they are 0, as well).
Not only does this mess up my results, my model specification and basically any output that eViews produces (in the sense that they are no longer similar to the paper I am supposed to replicate), but it 'feels' wrong. I know this is meant to allow PO to enter the cointegrating space, but not be affected by the other variables; however, I still have that nagging feeling that this is not right.
So, I'd appreciate it if someone could tell me their views on this or point me in the direction of a better solution. Perhaps also point me in the direction of some good material on VAR/VECM's with exogenous i(1) variables, because all I can find just seems to skim the surface of the issue.
Thank you.

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Hi lexie,
i believe this method will not work.
If we could, in addition to restricting the loading coefficent, also restrict the coefficients in the equation of the exogenous variable (treated as endogenous) also to be zero, and then estimate the cointegrating vector, it should have worked. unfortunately, this is not possible.
if we estimate the vecm model you suggest, make the model into a system and manually delete the equation with the exogenous variable, we are unfortunately using the wrong cointegrating vector when estimating the short term dynamics.
hopefully the Eviews team will fix this problem soon.
(see e.g., Harbo et al "Asymptotic inference on cointegrating rank in partial systems" (1998) Journal of Business & Economic Statistics)
i believe this method will not work.
If we could, in addition to restricting the loading coefficent, also restrict the coefficients in the equation of the exogenous variable (treated as endogenous) also to be zero, and then estimate the cointegrating vector, it should have worked. unfortunately, this is not possible.
if we estimate the vecm model you suggest, make the model into a system and manually delete the equation with the exogenous variable, we are unfortunately using the wrong cointegrating vector when estimating the short term dynamics.
hopefully the Eviews team will fix this problem soon.
(see e.g., Harbo et al "Asymptotic inference on cointegrating rank in partial systems" (1998) Journal of Business & Economic Statistics)
Re: Cointegration  exogenous variables
Dear Mr. Thomas von Brasch,
With regards to your earlier post, I am trying to test for cointegration in the presence of stationary, exogenous variables. I am using the approach of Rahbek and Mosconi (1999)  Cointegration rank inference with stationary regressors in VAR models, Econometrics Journal, where the stationary variables enter the system in the error correction term:
Δyt=AB'[ y_(t1) ∑z_(t)]' + µ z_t + ∑δ_i Δy_(ti) + ∑π_i Δ z_(ti) + v_t ,
with critical values tabulated in Harbo et al. (1998).
What I do, in PCGive, is to include the level of the stationary variables as restricted in the model, while their lags as unrestricted. However, I am not sure this is correct since PCGive does not show me the VECM and in Eviews I cannot restrict the exogenous variables in the cointegrating relation.
Any suggestions on how to deal with these exogenous variables are much appreciated.
Thank you!
Kind regards,
Oana Peia
With regards to your earlier post, I am trying to test for cointegration in the presence of stationary, exogenous variables. I am using the approach of Rahbek and Mosconi (1999)  Cointegration rank inference with stationary regressors in VAR models, Econometrics Journal, where the stationary variables enter the system in the error correction term:
Δyt=AB'[ y_(t1) ∑z_(t)]' + µ z_t + ∑δ_i Δy_(ti) + ∑π_i Δ z_(ti) + v_t ,
with critical values tabulated in Harbo et al. (1998).
What I do, in PCGive, is to include the level of the stationary variables as restricted in the model, while their lags as unrestricted. However, I am not sure this is correct since PCGive does not show me the VECM and in Eviews I cannot restrict the exogenous variables in the cointegrating relation.
Any suggestions on how to deal with these exogenous variables are much appreciated.
Thank you!
Kind regards,
Oana Peia

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Dear Chris,
Do you think you can make the option of restricting exogenous variables available as an addin? and if so, when do you think such an addin could be released?
Sincerely
Thomas von Brasch
Do you think you can make the option of restricting exogenous variables available as an addin? and if so, when do you think such an addin could be released?
Sincerely
Thomas von Brasch

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12640
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Cointegration  exogenous variables
It doesn't really lend itself to being done as an addin.
Follow us on Twitter @IHSEViews

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Thank you for your reply Gareth,
since an addin is not possible, is it possible to release a third upgrade, Eviews 7.3, with this functionality?
and if so, when do you think such an upgrade could be released?
Sincerely
Thomas von Brasch
since an addin is not possible, is it possible to release a third upgrade, Eviews 7.3, with this functionality?
and if so, when do you think such an upgrade could be released?
Sincerely
Thomas von Brasch

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12640
 Joined: Tue Sep 16, 2008 5:38 pm

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
Dear Eviews Glenn and Gareth!
We (Statistics Norway) are about to start a project where we will create a relatively small macroeconometric model for Norway. Being a small open economy, many foreign variables, such as the oil price, would typically be modelled as restricted exogenous. It would be great if we could use Eviews for the whole project.
I have now asked my employer to upgrade our ten Eviews licenses to version 8. I see that “user objects” is a new feature of Eviews 8.
Regarding my previous question about exogenous variables in the cointegrating relationship and your response Glenn: “I'll note that while this doesn't lend itself to an addin, it's possible that it might work as a user object. We'd have to take a look but as you might understand there are a number of other things we are considering and this isn't necessarily at the top of the list as we haven't gotten a lot of requests. Certainly someone enterprising could give it a shot. But we will give it some thought.” (viewtopic.php?f=28&t=7316). If I were to try and make a user object that estimates a cointegrating relationships with restricted exogenous variables, I need a function that solves the generalised eigenvalue problem. This function is not yet included in Eviews. I’m not sure how to make such a user object without this function. (to be honest, I’m not absolutely sure how to make the user object with this function either )
Since you already have the code with exogenous variables being unrestricted, it should not be that much work to use that code to create a “user object” that allows for exogenous variables also being restricted in the cointegrating space.
I’m sorry to bother you again with this question, but it is of great importance to us that this functionality is added. Can you please make a user object with this functionality?
Sincerely
Thomas von Brasch
Statistics Norway
We (Statistics Norway) are about to start a project where we will create a relatively small macroeconometric model for Norway. Being a small open economy, many foreign variables, such as the oil price, would typically be modelled as restricted exogenous. It would be great if we could use Eviews for the whole project.
I have now asked my employer to upgrade our ten Eviews licenses to version 8. I see that “user objects” is a new feature of Eviews 8.
Regarding my previous question about exogenous variables in the cointegrating relationship and your response Glenn: “I'll note that while this doesn't lend itself to an addin, it's possible that it might work as a user object. We'd have to take a look but as you might understand there are a number of other things we are considering and this isn't necessarily at the top of the list as we haven't gotten a lot of requests. Certainly someone enterprising could give it a shot. But we will give it some thought.” (viewtopic.php?f=28&t=7316). If I were to try and make a user object that estimates a cointegrating relationships with restricted exogenous variables, I need a function that solves the generalised eigenvalue problem. This function is not yet included in Eviews. I’m not sure how to make such a user object without this function. (to be honest, I’m not absolutely sure how to make the user object with this function either )
Since you already have the code with exogenous variables being unrestricted, it should not be that much work to use that code to create a “user object” that allows for exogenous variables also being restricted in the cointegrating space.
I’m sorry to bother you again with this question, but it is of great importance to us that this functionality is added. Can you please make a user object with this functionality?
Sincerely
Thomas von Brasch
Statistics Norway

 Fe ddaethom, fe welon, fe amcangyfrifon
 Posts: 12640
 Joined: Tue Sep 16, 2008 5:38 pm
Re: Cointegration  exogenous variables
The code that performs vec estimation is completely separate from that that could be used in a User Object. I don't think any one here will create it, no. That doesn't mean that an enterprising user won't!
Follow us on Twitter @IHSEViews

 Posts: 442
 Joined: Fri Apr 15, 2011 5:35 am
Re: Cointegration  exogenous variables
ok, can you give me a clue on how to solve the generalised eigenvalue problem with eviews?
t
t
Who is online
Users browsing this forum: No registered users and 18 guests