"Invalid endogenous variable specification for system"

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

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

"Invalid endogenous variable specification for system"

Postby alex_hk90 » Thu Feb 24, 2011 9:43 am

Hi all,

I'm trying to estimate a structural VAR (SVAR) which has non-linear cross-equation identifiying restrictions. It doesn't look like EViews supports this using the "Estimate Structural Factorization" procedure in the VAR object, so I've rewritten it out as a system (which was very time-consuming as it doesn't look like you can specify a matrix system, so I had to expand out each line). Now when I try to estimate it I get "Error Message": "Invalid endogenous variable specification for system". Or sometimes "No valid observations in equation..." (this only happens when the text cursor is not at the end of the window I think, but is not very consistent in its behaviour).

The system is made up of 3 equations and 3 endogenous variables (with lags), where each of the variables (and their lags) appears in each equations. There are 5 coefficients to estimate. It is assumed that the (structural) error vector is normally distributed with mean zero and a diagonal variance-covariance matrix (I believe this is the standard assumption for FIML). Any ideas where I'm going wrong? The error message is not very informative as to why it's an invalid specification.

Thanks in advance,

Alex

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

Re: "Invalid endogenous variable specification for system"

Postby EViews Gareth » Thu Feb 24, 2011 9:59 am

Hard to tell without seeing your specification

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Thu Feb 24, 2011 5:41 pm

Hard to tell without seeing your specification
I didn't post it because it's ridiculously long and near enough impossible to follow when it's not in matrix form:

Code: Select all

((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1)))*X + ((-var01a_c1(1,2) - C(1)*var01a_c1(2,2)))*INFL + ((-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3))))*I_P = ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c1(1,1) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c1(2,1) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c1(3,1))*X(-1) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c1(1,2) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c1(2,2) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c1(3,2))*INFL(-1) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c1(1,3) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c1(2,3) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c1(3,3))*I_P(-1) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c2(1,1) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c2(2,1) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c2(3,1))*X(-2) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c2(1,2) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c2(2,2) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c2(3,2))*INFL(-2) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c2(1,3) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c2(2,3) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c2(3,3))*I_P(-2) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c1(1,3) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c1(2,3) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c1(3,3))*X(-3) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c3(1,2) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c3(2,2) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c3(3,2))*INFL(-3) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c3(1,3) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c3(2,3) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c3(3,3))*I_P(-3) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c4(1,1) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c4(2,1) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c4(3,1))*X(-4) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c4(1,2) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c4(2,2) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c4(3,2))*INFL(-4) + ((1 - var01a_c1(1,1) - C(1)*var01a_c1(2,1))*var01a_c4(1,3) + (-var01a_c1(1,2) - C(1)*var01a_c1(2,2))*var01a_c4(2,3) + (-var01a_c1(1,3) + C(1)*(1 - var01a_c1(2,3)))*var01a_c4(3,3))*I_P(-4) ((-C(2)*var01a_c1(2,1) - C(3)))*X + ((1 - C(2)*var01a_c1(2,2)))*INFL + ((-C(2)*var01a_c1(2,3)))*I_P = ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c1(2,1) + (1 - C(2)*var01a_c1(2,2))*var01a_c1(2,1) + (-C(2)*var01a_c1(2,3))*var01a_c1(3,1))*X(-1) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c1(2,2) + (1 - C(2)*var01a_c1(2,2))*var01a_c1(2,2) + (-C(2)*var01a_c1(2,3))*var01a_c1(3,2))*INFL(-1) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c1(2,3) + (1 - C(2)*var01a_c1(2,2))*var01a_c1(2,3) + (-C(2)*var01a_c1(2,3))*var01a_c1(3,3))*I_P(-1) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c2(2,1) + (1 - C(2)*var01a_c1(2,2))*var01a_c2(2,1) + (-C(2)*var01a_c1(2,3))*var01a_c2(3,1))*X(-2) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c2(2,2) + (1 - C(2)*var01a_c1(2,2))*var01a_c2(2,2) + (-C(2)*var01a_c1(2,3))*var01a_c2(3,2))*INFL(-2) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c2(2,3) + (1 - C(2)*var01a_c1(2,2))*var01a_c2(2,3) + (-C(2)*var01a_c1(2,3))*var01a_c2(3,3))*I_P(-2) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c1(2,3) + (1 - C(2)*var01a_c1(2,2))*var01a_c1(2,3) + (-C(2)*var01a_c1(2,3))*var01a_c1(3,3))*X(-3) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c3(2,2) + (1 - C(2)*var01a_c1(2,2))*var01a_c3(2,2) + (-C(2)*var01a_c1(2,3))*var01a_c3(3,2))*INFL(-3) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c3(2,3) + (1 - C(2)*var01a_c1(2,2))*var01a_c3(2,3) + (-C(2)*var01a_c1(2,3))*var01a_c3(3,3))*I_P(-3) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c4(2,1) + (1 - C(2)*var01a_c1(2,2))*var01a_c4(2,1) + (-C(2)*var01a_c1(2,3))*var01a_c4(3,1))*X(-4) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c4(2,2) + (1 - C(2)*var01a_c1(2,2))*var01a_c4(2,2) + (-C(2)*var01a_c1(2,3))*var01a_c4(3,2))*INFL(-4) + ((-C(2)*var01a_c1(2,1) - C(3))*var01a_c4(2,3) + (1 - C(2)*var01a_c1(2,2))*var01a_c4(2,3) + (-C(2)*var01a_c1(2,3))*var01a_c4(3,3))*I_P(-4) ((-C(4)*var01a_c1(2,1) - C(5)))*X + ((-1 - C(4)*var01a_c1(2,2)))*INFL + ((-1 - C(4)*var01a_c1(2,3)))*I_P = ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c1(3,1) + (-1 - C(4)*var01a_c1(2,2))*var01a_c1(3,1) + (-1 - C(4)*var01a_c1(2,3))*var01a_c1(3,1))*X(-1) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c1(3,2) + (-1 - C(4)*var01a_c1(2,2))*var01a_c1(3,2) + (-1 - C(4)*var01a_c1(2,3))*var01a_c1(3,2))*INFL(-1) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c1(3,3) + (-1 - C(4)*var01a_c1(2,2))*var01a_c1(3,3) + (-1 - C(4)*var01a_c1(2,3))*var01a_c1(3,3))*I_P(-1) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c2(3,1) + (-1 - C(4)*var01a_c1(2,2))*var01a_c2(3,1) + (-1 - C(4)*var01a_c1(2,3))*var01a_c2(3,1))*X(-2) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c2(3,2) + (-1 - C(4)*var01a_c1(2,2))*var01a_c2(3,2) + (-1 - C(4)*var01a_c1(2,3))*var01a_c2(3,2))*INFL(-2) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c2(3,3) + (-1 - C(4)*var01a_c1(2,2))*var01a_c2(3,3) + (-1 - C(4)*var01a_c1(2,3))*var01a_c2(3,3))*I_P(-2) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c1(3,3) + (-1 - C(4)*var01a_c1(2,2))*var01a_c1(3,3) + (-1 - C(4)*var01a_c1(2,3))*var01a_c1(3,3))*X(-3) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c3(3,2) + (-1 - C(4)*var01a_c1(2,2))*var01a_c3(3,2) + (-1 - C(4)*var01a_c1(2,3))*var01a_c3(3,2))*INFL(-3) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c3(3,3) + (-1 - C(4)*var01a_c1(2,2))*var01a_c3(3,3) + (-1 - C(4)*var01a_c1(2,3))*var01a_c3(3,3))*I_P(-3) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c4(3,1) + (-1 - C(4)*var01a_c1(2,2))*var01a_c4(3,1) + (-1 - C(4)*var01a_c1(2,3))*var01a_c4(3,1))*X(-4) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c4(3,2) + (-1 - C(4)*var01a_c1(2,2))*var01a_c4(3,2) + (-1 - C(4)*var01a_c1(2,3))*var01a_c4(3,2))*INFL(-4) + ((-C(4)*var01a_c1(2,1) - C(5))*var01a_c4(3,3) + (-1 - C(4)*var01a_c1(2,2))*var01a_c4(3,3) + (-1 - C(4)*var01a_c1(2,3))*var01a_c4(3,3))*I_P(-4)
var01a_ci(j,k) are 3 by 3 matrices that I've (manually for the time being) filled with the results from the reduced form VAR(4), so they're essentially constants.

I'll try to work backwards to a point where it becomes perhaps more understandable.
In matrix form, the system I want to estimate is:
A0*x = A0*C1*x(-1) + A0*C2*x(-2)+ A0*C3*x(-3)+ A0*C4*x(-4) + epsilon
where: x is the vector of the 3 endogenous variables (X, INFL, I_P in the above);
Ci (i = 1, 2, 3, 4) are the estimated coefficient matrices from the reduced form VAR (var_01a_ci in the above);
epsilon (structural error vector) is assumed to be normally distributed with mean zero and diagonal covaraince matrix;
A0 is a matrix containing the identifying restrictions which includes the coefficients to be estimated, and elements from the estimated coefficient matrices Ci:
(columns separated by semicolons)
row 1: 1 - C1(1,1) - C(1)*C1(2,1) ; -C1(1,2) - C(1)*C1(2,2) ; -C1(1,3) + C(1)*(1 - C1(2,3))
row 2: -C(2)*C1(2,1) - C(3) ; 1 - C(2)*C1(2,2) ; -C(2)*C1(2,3)
row 3: -C(4)*C1(2,1) - C(5) ; -1 - C(4)*C1(2,2) ; -1 - C(4)*C1(2,3)

A0 specifies the structural VAR where: u_t = A0 * e_t
Ideally, I would just specify this as the 'A' matrix for the 'Identifying Restrictions' in the 'Estimate Structural Factorization' procedure in the VAR object, but it doesn't look like EViews supports this (non-linear cross-equation restrictions) as I can't seem to specify a matrix with coefficients to be estimated within it (the element just becomes 'NA').

I could go back a final step to the 3 individual equations relating the structural shocks to the VAR innovations, but hopefully it's clear enough already to get some idea of what I want to do.

Thanks for reading this far. :)

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Sun Mar 06, 2011 1:02 pm

Hmm, it seems that I am misunderstanding how to use the system object.

I just tried to repeat the example identification given in the EViews 7 manual for SVARs:
@e1 = C(1)*@u1
@e2 = C(2)*@e1 + C(3)*@u2
@e3 = C(4)*@e1 + C(5)*@e2 + C(6)*@u3

So in the form Ae_t = Bu_t, B is a diagonal matrix and A is lower triangular with the diagonal elements each restricted to 1.

Now in the form u_t = A0*e_t, this simply means a lower triangular A0 matrix.
So the system (structural form) to estimate (in matrices) is:
A0*x_t = A0*C1*x_t-1 + ... + A0*C4*x_t-4 + epsilon_t
where C1 to C4 are the estimated matrices from the reduced form:
x_t = C1*x_t-1 + ... + C4*x_t-4 + e_t

So I make the resulting system to be:

Code: Select all

C(1)*X = C(1)*var01a_c1(1,1)*X(-1) + C(1)*var01a_c1(1,2)*INFL(-1) + C(1)*var01a_c1(1,3)*I_P(-1) + C(1)*var01a_c2(1,1)*X(-2) + C(1)*var01a_c2(1,2)*INFL(-2) + C(1)*var01a_c2(1,3)*I_P(-2) + C(1)*var01a_c3(1,1)*X(-3) + C(1)*var01a_c3(1,2)*INFL(-3) + C(1)*var01a_c3(1,3)*I_P(-3) + C(1)*var01a_c4(1,1)*X(-4) + C(1)*var01a_c4(1,2)*INFL(-4) + C(1)*var01a_c4(1,3)*I_P(-4) C(2)*X + C(3)*INFL = (C(2)*var01a_c1(1,1) + C(3)*var01a_c1(2,1))*X(-1) + (C(2)*var01a_c1(1,2) + C(3)*var01a_c1(2,2))*INFL(-1) + (C(2)*var01a_c1(1,3) + C(3)*var01a_c1(2,3))*I_P(-1) + (C(2)*var01a_c2(1,1) + C(3)*var01a_c2(2,1))*X(-2) + (C(2)*var01a_c2(1,2) + C(3)*var01a_c2(2,2))*INFL(-2) + (C(2)*var01a_c2(1,3) + C(3)*var01a_c2(2,3))*I_P(-2) + (C(2)*var01a_c3(1,1) + C(3)*var01a_c3(2,1))*X(-3) + (C(2)*var01a_c3(1,2) + C(3)*var01a_c3(2,2))*INFL(-3) + (C(2)*var01a_c3(1,3) + C(3)*var01a_c3(2,3))*I_P(-3) + (C(2)*var01a_c4(1,1) + C(3)*var01a_c4(2,1))*X(-4) + (C(2)*var01a_c4(1,2) + C(3)*var01a_c4(2,2))*INFL(-4) + (C(2)*var01a_c4(1,3) + C(3)*var01a_c4(2,3))*I_P(-4) C(4)*X + C(5)*INFL + C(6)*I_P = (C(4)*var01a_c1(1,1) + C(5)*var01a_c1(2,1) + C(6)*var01a_c1(3,1))*X(-1) + (C(4)*var01a_c1(1,2) + C(5)*var01a_c1(2,2) + C(6)*var01a_c1(3,2))*INFL(-1) + (C(4)*var01a_c1(1,3) + C(5)*var01a_c1(2,3) + C(6)*var01a_c1(3,3))*I_P(-1) + (C(4)*var01a_c2(1,1) + C(5)*var01a_c2(2,1) + C(6)*var01a_c2(3,1))*X(-2) + (C(4)*var01a_c2(1,2) + C(5)*var01a_c2(2,2) + C(6)*var01a_c2(3,2))*INFL(-2) + (C(4)*var01a_c2(1,3) + C(5)*var01a_c2(2,3) + C(6)*var01a_c2(3,3))*I_P(-2) + (C(4)*var01a_c3(1,1) + C(5)*var01a_c3(2,1) + C(6)*var01a_c3(3,1))*X(-3) + (C(4)*var01a_c3(1,2) + C(5)*var01a_c3(2,2) + C(6)*var01a_c3(3,2))*INFL(-3) + (C(4)*var01a_c3(1,3) + C(5)*var01a_c3(2,3) + C(6)*var01a_c3(3,3))*I_P(-3) + (C(4)*var01a_c4(1,1) + C(5)*var01a_c4(2,1) + C(6)*var01a_c4(3,1))*X(-4) + (C(4)*var01a_c4(1,2) + C(5)*var01a_c4(2,2) + C(6)*var01a_c4(3,2))*INFL(-4) + (C(4)*var01a_c4(1,3) + C(5)*var01a_c4(2,3) + C(6)*var01a_c4(3,3))*I_P(-4)
where again var01a_ci(j,k) are 3 by 3 matrices that I've manually filled with the results from the reduced form VAR(4) (essentially constants).

But I get exactly the same errors I described in my first posts, when trying to use FIML to estimate this. I get 'near singular matrix' for OLS or SUR.

So my question now is rather simpler - how do I use the system object to replicate the basic structural factorisation for VARs that is given in the manual?
If I can at least do this then I should be able to see where I'm going wrong with my more complicated system.

Thanks again for reading and any suggestions. :)

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

Re: "Invalid endogenous variable specification for system"

Postby EViews Gareth » Sun Mar 06, 2011 1:24 pm

To be honest, I'm not sure you can.

donihue
Posts: 139
Joined: Wed Oct 07, 2009 8:51 am

Re: "Invalid endogenous variable specification for system"

Postby donihue » Mon Mar 07, 2011 5:19 am

This is a very interesting issue for those of us who use SVARs; I hope you reach a positive resolution, as it would be useful for others.

A suggestion: as your set-up is so complex with the VAR(4), why not try testing one of your non-linear constraints (eg 1 - C1(1,1) - C(1)*C1(2,1) ) on the much simpler VAR(1) A0*x = A0*C1*x(-1) + epsilon just to see if it is at all possible to implement this approach? Gareth doesn't think so, but at least this way you could be sure.

Regards
Donihue

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: "Invalid endogenous variable specification for system"

Postby EViews Glenn » Mon Mar 07, 2011 10:27 am

To be precise. I think what Gareth means is that you can't use the matrix expressions in the setup of your system since systems may only be expressed in terms of series, constants, and coefficients.

What you *can* do is to hard-code the constants from the matrix in the specification. This can be done using a program to generate the desired system from the matrix elements. To simply greatly, suppose that we have a vector with two elements

Code: Select all

vector(2) vec vec(1) = 1.3 vec(2) = 2.2
and we want to use these in the construction of a system. What we can do is to create a program containing something like

Code: Select all

!b1 = vec(1) !b2 = vec(2) system mysys mysys.add y1 = c(1) + c(2)*!b1*x mysys.add y2 = c(3) + c(4)*!b2*z
which will yield a system object containing

Code: Select all

Y1 = C(1) + C(2)*1.3*X Y2 = C(3) + C(4)*2.2*Z
The extension to your case should be pretty straightforward. Simply create a set of intermediate replacement variables and construct the system in a program using those in place of the direct reference to the matrix elements. Note that you've already done the hard work of evaluating the expansion in terms of matrix elements.

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Mon Mar 07, 2011 5:38 pm

This is a very interesting issue for those of us who use SVARs; I hope you reach a positive resolution, as it would be useful for others.

A suggestion: as your set-up is so complex with the VAR(4), why not try testing one of your non-linear constraints (eg 1 - C1(1,1) - C(1)*C1(2,1) ) on the much simpler VAR(1) A0*x = A0*C1*x(-1) + epsilon just to see if it is at all possible to implement this approach? Gareth doesn't think so, but at least this way you could be sure.

Regards
Donihue
Trying a VAR(1) is a good idea, thanks. :)

I've tried to repeat the very simple identification from the manual with a VAR(1) and get the same problem:

Code: Select all

C(1)*X = C(1)*0.9033390356740544*X(-1) + C(1)*-0.06263556397167213*INFL(-1) + C(1)*0.0001956368624860587*I_P(-1) C(2)*X + C(3)*INFL = (C(2)*0.9033390356740544 + C(3)*0.1874619521116482)*X(-1) + (C(2)*-0.06263556397167213 + C(3)*0.9078671683914139)*INFL(-1) + (C(2)*0.0001956368624860587 + C(3)*0.0002508383396329897)*I_P(-1) C(4)*X + C(5)*INFL + C(6)*I_P = (C(4)*0.9033390356740544 + C(5)*0.1874619521116482 + C(6)*2.701540106451125)*X(-1) +(C(4)*-0.06263556397167213 + C(5)*0.9078671683914139 + C(6)*19.27321921510948)*INFL(-1) +(C(4)*0.0001956368624860587 + C(5)*0.0002508383396329897 + C(6)*0.8241975631085923)*I_P(-1)
(the numbers are the appropriate estimates from the reduced form VAR)
I can't see how this is different from what the 'Estimate structural factorisation' function does, but I still get either "Invalid endogenous variable specification for system" or "No valid observations in equation...". :?
To be precise. I think what Gareth means is that you can't use the matrix expressions in the setup of your system since systems may only be expressed in terms of series, constants, and coefficients.

What you *can* do is to hard-code the constants from the matrix in the specification. This can be done using a program to generate the desired system from the matrix elements. To simply greatly, suppose that we have a vector with two elements

Code: Select all

vector(2) vec vec(1) = 1.3 vec(2) = 2.2
and we want to use these in the construction of a system. What we can do is to create a program containing something like

Code: Select all

!b1 = vec(1) !b2 = vec(2) system mysys mysys.add y1 = c(1) + c(2)*!b1*x mysys.add y2 = c(3) + c(4)*!b2*z
which will yield a system object containing

Code: Select all

Y1 = C(1) + C(2)*1.3*X Y2 = C(3) + C(4)*2.2*Z
The extension to your case should be pretty straightforward. Simply create a set of intermediate replacement variables and construct the system in a program using those in place of the direct reference to the matrix elements. Note that you've already done the hard work of evaluating the expansion in terms of matrix elements.
This is essentially what I've been doing manually. But it's good to know that if I get it to work then it can be automated, so thanks. :)

donihue
Posts: 139
Joined: Wed Oct 07, 2009 8:51 am

Re: "Invalid endogenous variable specification for system"

Postby donihue » Tue Mar 08, 2011 2:52 am

Hello,

I have just tested (see attached, using 7 Mar 2011 build of EViews7.1) your "small" specification on some data I use for testing.
I did not get your errors of either "Invalid endogenous variable specification for system" or "No valid observations in equation...".
Rather, the estimation of the system (test1) "worked", in the sense that it ran, but all the coefficients are set at zero ...
I am not sure why this happens, but I am guessing that "system" wants one endogenous variable with a unitary coefficient per equation.
I eliminated C(1) on the LHS for just the first equation, and obtained non-zero coefficients (but the usual regression stats only for that equation) - see "test2"

Regards
Donihue
Attachments
sys_as_svar_test.wf1
(15.8 KiB) Downloaded 693 times

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: "Invalid endogenous variable specification for system"

Postby EViews Glenn » Tue Mar 08, 2011 11:02 am

I would like to point out here that setting all of the C to zero *is* the best estimate of the coefficients in the system since the residuals will be identically equal to zero. Can't really do better than that :)

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Wed Mar 09, 2011 1:50 pm

Hello,

I have just tested (see attached, using 7 Mar 2011 build of EViews7.1) your "small" specification on some data I use for testing.
I did not get your errors of either "Invalid endogenous variable specification for system" or "No valid observations in equation...".
Rather, the estimation of the system (test1) "worked", in the sense that it ran, but all the coefficients are set at zero ...
I am not sure why this happens, but I am guessing that "system" wants one endogenous variable with a unitary coefficient per equation.
I eliminated C(1) on the LHS for just the first equation, and obtained non-zero coefficients (but the usual regression stats only for that equation) - see "test2"

Regards
Donihue
Thanks, that's interesting. I just tried using your data set and get the same errors. Then I tried it on the Faculty computers and got the same results you did. It seems that maybe the version I've been using (on the college computers) doesn't work properly compared to the one installed at the Faculty. I'll investigate this more later. They're both EViews 7.1 but the build is slightly older at the Faculty.

Were you able to get it to do FIML? I could only get OLS to work, and am not sure if that will be efficient for the estimation I want to do.

I'd like to get this to work in EViews as I'm most familiar with it but am looking at switching to Stata (or something else) with all the issues I've been having.

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Mon Mar 14, 2011 10:07 am

Right, it seems that at least part of the problem was the installation on the college computers, which gave "Near singular matrix" for the OLS estimation. Using the Faculty installation or EViews 6 allows all the systems mentioned so far to be estimated.

However, the problem with the FIML estimation remains, it still gives "Invalid endogenous variable specification for system".

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: "Invalid endogenous variable specification for system"

Postby EViews Glenn » Mon Mar 14, 2011 11:05 am

In contrast to other system estimators, FIML requires specific information about the identities of the dependent variables in the system (which is used in computing the Jacobian). As noted in the manual, EViews uses the first variable found in each equation line to identify the dependent variables for the system. In the example that you have, X appears as the first dependent variable in *each* of the lines, hence the invalid endogenous variable specification message.

If you rewrite the specification slightly so that there is a different variable as the first in each equation, you shouldn't get the message:

Code: Select all

C(1)*X = C(1)*0.9033390356740544*X(-1) + C(1)*-0.06263556397167213*INFL(-1) + C(1)*0.0001956368624860587*I_P(-1) C(3)*INFL + C(2)*X = (C(2)*0.9033390356740544 + C(3)*0.1874619521116482)*X(-1) + (C(2)*-0.06263556397167213 + C(3)*0.9078671683914139)*INFL(-1) + (C(2)*0.0001956368624860587 + C(3)*0.0002508383396329897)*I_P(-1) C(6)*I_P + C(4)*X + C(5)*INFL= (C(4)*0.9033390356740544 + C(5)*0.1874619521116482 + C(6)*2.701540106451125)*X(-1) +(C(4)*-0.06263556397167213 + C(5)*0.9078671683914139 + C(6)*19.27321921510948)*INFL(-1) +(C(4)*0.0001956368624860587 + C(5)*0.0002508383396329897 + C(6)*0.8241975631085923)*I_P(-1)
You do, however, still have the problem that your system isn't really identified since it has a solution where C(1)=C(2)=...=C(6)=0 yields residuals of 0.

alex_hk90
Posts: 19
Joined: Tue Feb 22, 2011 1:48 pm

Re: "Invalid endogenous variable specification for system"

Postby alex_hk90 » Wed Mar 16, 2011 7:02 am

In contrast to other system estimators, FIML requires specific information about the identities of the dependent variables in the system (which is used in computing the Jacobian). As noted in the manual, EViews uses the first variable found in each equation line to identify the dependent variables for the system. In the example that you have, X appears as the first dependent variable in *each* of the lines, hence the invalid endogenous variable specification message.
Thanks; that seems to be the main thing I was missing. :) I now get a "Singular covariance" warning but I think that's to do with the specification itself rather than EViews so as far as I'm concerned this thread is resolved. Thanks again for the replies everyone. :)

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: "Invalid endogenous variable specification for system"

Postby EViews Glenn » Wed Mar 16, 2011 9:16 am

Glad we got it figured out...


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 2 guests