Hello. I am trying to impose multiple constraints on my Quadratic Almost Ideal Demand system model by using nlsur command. I am unable to impose them with this command. my main set of equations is
nlsur ( elec_share11 = {b1} + {b2}*lnelecp + {b3}*lnfirwoodp + {b4}*lnkoilp + {b5}* lngasp_simple_avg + {b6}* ofuelp11 + {b7}* pcfuelexp_savgSI + {b8}* pcfuelexp_savgSI^2 + {b9}* region11 + {b10}* maths_simple+ {b11}* ln_total_exp+ {b12}* fsize + {b13}* age ) ( gas_share11 = {c1} + {c2}*lnelecp + {c3}*lnfirwoodp + {c4}*lnkoilp + {c5}* lngasp_simple_avg + {c6}* ofuelp11 + {c7}* pcfuelexp_savgSI + {c8}* pcfuelexp_savgSI^2+ {c9}* region11 + {c10}* maths_simple+ {c11}* ln_total_exp+ {c12}* fsize + {c13}* age) ( koil_share11 = {d1} + {d2}*lnelecp + {d3}*lnfirwoodp + {d4}*lnkoilp + {d5}* lngasp_simple_avg + {d6}* ofuelp11 + {d7}* pcfuelexp_savgSI + {d8}* pcfuelexp_savgSI^2 + {d9}* region11 + {d10}* maths_simple+ {d11}* ln_total_exp+ {d12}* fsize + {d13}* age ) ( firwood_share11 = {e1} + {e2}*lnelecp + {e3}*lnfirwoodp + {e4}*lnkoilp + {e5}* lngasp_simple_avg + {e6}* ofuelp11 + {e7}* pcfuelexp_savgSI + {e8}* pcfuelexp_savgSI^2 + {e9}* region11 + {e10}* maths_si! mple+ {e11}* ln_total_exp+ {e12}* fsize + {e13}* age ) ( ofuels_share11 = {f1} + {f2}*lnelecp + {f3}*lnfirwoodp + {f4}*lnkoilp + {f5}* lngasp_simple_avg + {f6}* ofuelp11 + {f7}* pcfuelexp_savgSI + {f8}* pcfuelexp_savgSI^2 + {f9}* region11 + {f10}* maths_simple+ {f11}* ln_total_exp+ {f12}* fsize + {f13}* age ) This runs perfectly. Now i want to impose homogeneity and symmetry restrictions on this system of equations and run model again the restrictions are
constraint 1 [elec_share11]lngasp_simple_avg= [gas_share11] lnelecp
constraint 2 [elec_share11] lnkoilp = [koil_share11]lnelecp
constraint 3 [elec_share11]lnfirwoodp = [firwood_share11] lnelecp
constraint 4 [elec_share11]ofuelp11 = [ofuels_share11] lnelecp
constraint 5 [gas_share11] lnkoilp = [koil_share11]lngasp_simple_avg
constraint 6 [gas_share11] lnfirwoodp = [firwood_share11]lngasp_simple_avg
constraint 7 [gas_share11] ofuelp11= [ofuels_share11] lngasp_simple_avg
constraint 8 [koil_share11] lnfirwoodp = [firwood_share11] lnkoilp
constraint 9 [koil_share11] ofuelp11 = [ofuels_share11] lnkoilp
constraint 10 [firwood_share11] ofuelp11 = [ofuels_share11] lnfirwoodp
constraint 11 [elec_share11]_b[lnelecp]+[ elec_share11]_b[lnkoilp]+[ elec_share11]_b[ lnfirwoodp]+[ elec_share11]_b[lngasp_simple_avg]+[elec_share11]_b[ofuelp11]=0
constraint 12 [gas_share11]_b[lnelecp]+[ gas_share11]_b[lnkoilp]+[ gas_share11]_b[ lnfirwoodp]+[ gas_share11]_b[lngasp_simple_avg]+[ gas_share11]_b[ofuelp11]=0
constraint 13 [koil_share11]_b[lnelecp]+[ koil_share11]_b[lnkoilp]+[ koil_share11]_b[ lnfirwoodp]+[ koil_share11]_b[lngasp_simple_avg]+[ koil_share11]_b[ofuelp11]=0
constraint 14 [firwood_share11]_b[lnelecp]+[ firwood_share11]_b[lnkoilp]+[ firwood_share11]_b[ lnfirwoodp]+[ firwood_share11]_b[lngasp_simple_avg]+[ firwood_share11]_b[ofuelp11]=0
constraint 15 [ofuels_share11]_b[lnelecp]+[ ofuels_share11]_b[lnkoilp]+[ ofuels_share11]_b[ lnfirwoodp]+[ ofuels_share11]_b[lngasp_simple_avg]+[ ofuels_share11]_b[ofuelp11]=0
Kindly guide the correct way of merging these restrictions with the nlsur command equation system.
thankyou
-
Login or Register
- Log in with