Hi everyone,
I want to get the chi2/f-stat output on a regression table, preferably using outreg2. It works perfectly using cmp with two equations, but it does not work with three equations.
Code for two-equation cmp (WORKS):
Code for three-equation cmp (DOES NOT WORK) [Error: invalid syntax]:
Any help and suggestions will be greatly appreciated!
Thank you!
I want to get the chi2/f-stat output on a regression table, preferably using outreg2. It works perfectly using cmp with two equations, but it does not work with three equations.
Code for two-equation cmp (WORKS):
Code:
eststo clear cmp (y1= l.y2 l.x1 l.x2 l.x3 i.year i.countryname) ( l.y2 = l.y1 x1 x2 z1 z2 z3 i.year i.countryname), indicators($cmp_cont $cmp_cont) cl(countryname) iterate(50) difficult estimates store est1 estimates restore est1 test ([l.y2] l.z1) local eq2_p= r(p) local eq2_chi = r(chi2) outreg2 using results_2eq, append dec(3) addtext(Country FE, Yes, Year FE, Yes) drop(i.countryname i.year) addstat(Eq2 Chi2, `eq2_f', Eq2 Chi2 p-value, `eq2_p')
Code for three-equation cmp (DOES NOT WORK) [Error: invalid syntax]:
Code:
eststo clear cmp (y1= l.y2 l.y3 l.x1 l.x2 l.x3 i.year i.countryname) ( l.y2 = l.y1 x1 x2 z1 z2 z3 i.year i.countryname) (l.y3 = l.y1 x1 x2 z1 z2 z3), indicators($cmp_cont $cmp_cont $cmp_cont) cl(countryname) iterate(50) difficult estimates store est1 estimates restore est1 test ([l.y2] l.z1) local eq2_p= r(p) local eq2_chi = r(chi2) test ([l.y3] l.z2) local eq3_p= r(p) local eq3_chi = r(chi2) test ([l.y2] l.z1 [l.y3] l.z2) local joint_p= r(p) local joint_chi = r(chi2) outreg2 using results_3eq, append dec(3) addtext(Country FE, Yes, Year FE, Yes) drop(i.countryname i.year) addstat(Eq2 Chi2, `eq2_f', Eq2 Chi2 p-value, `eq2_p', Eq3 Chi2, `eq3_f', Eq3 Chi2 p-value, `eq3_p', Joint Chi2, `joint_p', Joint Chi2 p-value, `joint_p')
Any help and suggestions will be greatly appreciated!
Thank you!
Comment