GMM error message

Reply
New Contributor
Posts: 3

GMM error message


Hi

We try to run the GMM at SAS. Here is the error message that we got :

At 2SLS Iteration 0 there are 0 missing observations available. At least 22 are needed to compute the next iteration.

What does it mean? how to to solve the problem?

thanks,

Lily

Super User
Posts: 19,167

Re: GMM error message

I think you'll need to provide more information. At least your code, possibly an example of data.

New Contributor
Posts: 3

Re: GMM error message

Here is my program coding:

Proc import out=black2004_2009 replace DATAFILE= "H:\Park_3972\model\black2004_2009.dta";
run;
proc contents data=black2004_2009;
run;
data black2004_2009_1;
set black2004_2009;
if an04=. then an04=0; if an05=. then an05=0; if an06=. then an06=0; if an07=. then an07=0; if an08=. then an08=0; if an09=. then an09=0;
trend=.; if an04=1 then trend=1; if an05=1 then trend=2; if an06=1 then trend=3; if an07=1 then trend=4; if an08=1 then trend=5; if an09=1 then trend=6;
age_rpmar=.; age_rpmar=rpage*rpmar; spage_co15=.; spage_c015=spage*c015tot; age_2=.; age_2=rpage*rpage; age_3=.; age_3=rpage*rpage*rpage; age_metro=.; age_metro=age*metro;
proprio=.; if clten=1 then proprio=1; if clten =2 then proprio=1; if clten=3 then proprio=0; if clten=4 then proprio=0;
run;

proc model data=black2004_2009_1;
parms a1-a5 s1-s15 b1-b5 v1-v5 o1-o6 c1-c5 c11-c15 c21-c25 c31-c35 c41-c45 c51-c55 d1-d5 d11-d15 d21-d25 d31-d35 d41-d45;
endogenous w_food w_alcohol w_fuel w_clothing w_pers ys yw ya yh;
eq.w_food=a1+d1*an05+d2*an06+d3*an07+d4*an08+d5*an09+s1*(exp(o0*trend**2+o1*trend)+1)*ys+s2*(((exp(o0*trend**2+o1*trend)+1)*ys)**2)+s3*(((exp(o0*trend**2+o1*trend)+1)*ys)**3)
+b1*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))
+v1*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))**2+
c1*child_1524+c2*age_spouse+c3*proprio+c4*urban+c5*nb_room+c6*car-w_food;
eq.w_alcohol=a2+d21*an05+d22*an06+d23*an07+d24*an08+d25*an09+s4*((exp(o0*trend**2+o1*trend)+1)*ys)+s5*(((exp(o0*trend**2+o1*trend)+1)*ys)**2)+s6*(((exp(o0*trend**2+o1*trend)+1)*ys)**3)
+b2*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))+
v2*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))**2+
c11*child_1524+c12*age_spouse+c13*proprio+c14*urban+c15*nb_room+c16*car-w_alcohol;
eq.w_fuel=a3+d31*an05+d32*an06+d33*an07+d34*an08+d35*an09+s7*((exp(o0*trend**2+o1*trend)+1)*ys)+s8*(((exp(o0*trend**2+o1*trend)+1)*ys)**2)+s9*(((exp(o0*trend**2+o1*trend)+1)*ys)**3)
+b3*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))
+v3*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))**2+
c21*child_1524+c22*age_spouse+c23*proprio+c24*urban+c25*nb_room+c26*car-w_fuel;
eq.w_clothing=a4+d41*an05+d42*an06+d43*an07+d44*an08+d45*an09+s10*((exp(o0*trend**2+o1*trend)+1)*ys)+s11*(((exp(o0*trend**2+o1*trend)+1)*ys)**2)+s12*(((exp(o0*trend**2+o1*trend)+1)*ys)**3)
+b4*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))
+v4*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))**2+
c31*child_1524+c32*age_spouse+c33*proprio+c34*urban+c35*nb_room+c36*car-w_clothing;
eq.w_pers=a5+d51*an05+d52*an06+d53*an07+d54*an08+d55*an09+s13*((exp(o0*trend**2+o1*trend)+1)*ys)+s14*(((exp(o0*trend**2+o1*trend)+1)*ys)**2)+s15*(((exp(o0*trend**2+o1*trend)+1)*ys)**3)
+b5*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))
+v5*(log(yh)+log(ya+yw+((exp(o0*trend**2+o1*trend)+1)*ys)))**2+
c41*child_1524+c42*age_spouse+c43*proprio+c44*urban+c45*nb_room+c46*car-w_pers;

fit w_food w_alcohol w_fuel w_clothing w_pers /gmm itgmm maxiter=10000 outv=w;

title 'Gmm avec une tendance et une tendance au carré sans constante et les années non contraint';
instruments rpmar age_rpmar spage_c015 age age_2 age_3 rpsex metro age_metro c015tot  child_1524 age_spouse proprio urban nb_room car an05 an06 an07 an08 an09/noint;
run;

Respected Advisor
Posts: 2,655

Re: GMM error message

Hi lily,

The SAS Forum Forecasting and Econometrics has several people who are experts on PROC MODEL.  I think you would get a good answer if you cross posted this to that forum as well.  This is an extremely complex model involving estimation of 91 parameters fit into a nonlinear format.  Often when fitting something complex, it is a good idea to start simple, and add on the other parts.  This is especially true when confronted with an error message that you have not experienced before.  By starting simple and building on, you will see (or at least you are more likely to see) when and from what the problem arises.

Steve Denham

Ask a Question
Discussion stats
  • 3 replies
  • 175 views
  • 0 likes
  • 3 in conversation