Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Adding Up restrictions in LA/AIDS model


From   "Xia Shang" <[email protected]>
To   [email protected]
Subject   st: Adding Up restrictions in LA/AIDS model
Date   Fri, 19 Nov 2010 09:57:59 -0600

Hello all,

I have a problem about the correct way to make adding up restrictions when
I estimated the LA/AIDS model by SUREG. I estimated 5 commodities so I
should run 4 equations.  The followings are my codes:

//adding up//
constraint define 1 [q1]_cons+[q2]_cons+[q3]_cons+[q4]_cons+[q5]_cons=1 
//Alfa//

constraint define 2 [q1]lnp1+[q2]lnp1+[q3]lnp1+[q4]lnp1+[q5]lnp1=0        
        //Gama//
constraint define 3 [q1]lnp2+[q2]lnp2+[q3]lnp2+[q4]lnp2+[q5]lnp2=0
constraint define 4 [q1]lnp3+[q2]lnp3+[q3]lnp3+[q4]lnp3+[q5]lnp3=0
constraint define 5 [q1]lnp4+[q2]lnp4+[q3]lnp4+[q4]lnp4+[q5]lnp4=0
constraint define 6 [q1]lnp5+[q2]lnp5+[q3]lnp5+[q4]lnp5+[q5]lnp5=0

constraint define 7 [q1]lnmp+[q2]lnmp+[q3]lnmp+[q4]lnmp+[q5]lnmp=0   
//Beta//

//homogeneity//
constraint define 8 [q1]lnp1+[q1]lnp2+[q1]lnp3+[q1]lnp4+[q1]lnp5=0
constraint define 9 [q2]lnp1+[q2]lnp2+[q2]lnp3+[q2]lnp4+[q2]lnp5=0
constraint define 10 [q3]lnp1+[q3]lnp2+[q3]lnp3+[q3]lnp4+[q3]lnp5=0
constraint define 11 [q4]lnp1+[q4]lnp2+[q4]lnp3+[q4]lnp4+[q4]lnp5=0

//symmetry//
constraint define 12 [q1]lnp2=[q2]lnp1
constraint define 13 [q1]lnp3=[q3]lnp1
constraint define 14 [q1]lnp4=[q4]lnp1
constraint define 15 [q2]lnp3=[q3]lnp2
constraint define 16 [q2]lnp4=[q4]lnp2
constraint define 17 [q3]lnp4=[q4]lnp3

global demand1 "(q1: w1 lnp1 lnp2 lnp3 lnp4 lnp5 lnmp)"
global demand2 "(q2: w2 lnp1 lnp2 lnp3 lnp4 lnp5 lnmp)"
global demand3 "(q3: w3 lnp1 lnp2 lnp3 lnp4 lnp5 lnmp)"
global demand4 "(q4: w4 lnp1 lnp2 lnp3 lnp4 lnp5 lnmp)"

sureg $demand1 $demand2 $demand3 $demand4, const(1 2 3 4 5 6 7 8 9 10 11
12 13 14 15 16 17) isure

But STATA reports me that
 (note: constraint number 1 caused error r(303))
(note: constraint number 2 caused error r(303))
(note: constraint number 3 caused error r(303))
(note: constraint number 4 caused error r(303))
(note: constraint number 5 caused error r(303))
(note: constraint number 6 caused error r(303))
(note: constraint number 7 caused error r(303))
which means the code adding-up constraints have some problems .

Can anybody point out why they are wrong?


Thank you very much


Xia




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index