Hi,
I am trying to estimate a SUR model with 40 equations, 5 regressors per equation and linear coefficient constraints across the 40 equations using Roodman's cmp command. Each of the 40 equations corresponds to one country. Each country has ~110 to 180 monthly observations. The coefficients are restricted to be equal across countries, i.e. across equations.
The main reason why I want to use cmp rather than sureg is that I have an unbalanced panel of data. I am following the suggestion by Kit Baum to use cmp as an equivalent command to sureg: http://fmwww.bc.edu/EC-C/S2016/8823/...n14.slides.pdf
After having specified the equations and constraints in macros and extended the matsize, I have tried to run the SUR regression using cmp. However, the estimation does not achieve convergence.
I have specified the regression as follows:
When I tried running it for the first time without specifying nonrtolerance tech(dfp nr) difficult interactive yet, it took Stata 48 hours for only 11 iterations of the ML but it would still indicate "not concave".
I followed the "Tips for achieving and speeding convergence" but cmp still cannot handle the SUR model specification. It does not go farer than this:
Is there any way to speed up the process? Or else, is there another way to estimate a SUR with an unbalanced panel AND linear cross-equation coefficient constraints? The latter question is related to my previous post:
http://www.statalist.org/forums/foru...ross-equations
Many thanks in advance!
Tatjana
I am trying to estimate a SUR model with 40 equations, 5 regressors per equation and linear coefficient constraints across the 40 equations using Roodman's cmp command. Each of the 40 equations corresponds to one country. Each country has ~110 to 180 monthly observations. The coefficients are restricted to be equal across countries, i.e. across equations.
The main reason why I want to use cmp rather than sureg is that I have an unbalanced panel of data. I am following the suggestion by Kit Baum to use cmp as an equivalent command to sureg: http://fmwww.bc.edu/EC-C/S2016/8823/...n14.slides.pdf
After having specified the equations and constraints in macros and extended the matsize, I have tried to run the SUR regression using cmp. However, the estimation does not achieve convergence.
I have specified the regression as follows:
Code:
*------------------------------------------------------------------------------* * Step 1: Create macros for the cmp regression *------------------------------------------------------------------------------* // Define equations forvalues i = 1/40 { global c`i' "(r2liq_`i' = mktret_`i' mktvol_`i' mktliq_`i' mktturn_`i' time)" di "$c`i'" } // Define coefficient constraints for 40 equations (à 40 countries) forvalues i = 1/39 { local j = `i' + 1 local k = `i' + 39 local l = `i' + 2*39 local m = `i' + 3*39 local n = `i' + 4*39 constraint `i' [r2liq_`i']mktret_`i' = [r2liq_`j']mktret_`j' constraint `k' [r2liq_`i']mktvol_`i' = [r2liq_`j']mktvol_`j' constraint `l' [r2liq_`i']mktliq_`i' = [r2liq_`j']mktliq_`j' constraint `m' [r2liq_`i']mktturn_`i' = [r2liq_`j']mktturn_`j' constraint `n' [r2liq_`i']time = [r2liq_`j']time } *------------------------------------------------------------------------------*v * Step 2: Run the cmp regression *------------------------------------------------------------------------------* set matsize 1500 // SUR using cmp cmp $c1 $c2 $c3 $c4 $c5 $c6 $c7 $c8 $c9 $c10 $c11 $c12 $c13 $c14 $c15 $c16 /// $c17 $c18 $c19 $c20 $c21 $c22 $c23 $c24 $c25 $c26 $c27 $c28 $c29 $c30 $c31 /// $c32 $c33 $c34 $c35 $c36 $c37 $c38 $c39 $c40, /// indicators(1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1) /// constraint(1-195) /// nonrtolerance tech(dfp nr) difficult interactive
I followed the "Tips for achieving and speeding convergence" but cmp still cannot handle the SUR model specification. It does not go farer than this:
Code:
Source | SS df MS Number of obs = 180 -------------+------------------------------ F( 5, 174) = 41.05 Model | 7.05891694 5 1.41178339 Prob > F = 0.0000 Residual | 5.98415464 174 .034391693 R-squared = 0.5412 -------------+------------------------------ Adj R-squared = 0.5280 Total | 13.0430716 179 .072866322 Root MSE = .18545 ------------------------------------------------------------------------------ r2liq_40 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mktret_40 | -.2172259 .3576781 -0.61 0.544 -.9231722 .4887203 mktvol_40 | .0461518 .0331787 1.39 0.166 -.0193328 .1116364 mktliq_40 | -17195.91 19340.27 -0.89 0.375 -55367.64 20975.82 mktturn_40 | 50.69199 15.18905 3.34 0.001 20.71348 80.67049 time | .0011005 .0010363 1.06 0.290 -.0009449 .0031459 _cons | -1.668928 .0879425 -18.98 0.000 -1.8425 -1.495357 ------------------------------------------------------------------------------ Warning: regressor matrix for r2liq_40 equation appears ill-conditioned. (Condition number = 1 > 57.03271.) This might prevent convergence. If it does, and if you have not done so already, you may need > to remove nearly collinear regressors to achieve convergence. Or you may need to add a nrtolerance(#) or nonrto > lerance option to the command line. See cmp tips. Fitting full model. (setting technique to dfp) Iteration 0: log likelihood = -579061.22 Iteration 1: log likelihood = -453965.72 (backed up) Iteration 2: log likelihood = -189756.27 (backed up) Iteration 3: log likelihood = -59124.591 (backed up) Iteration 4: log likelihood = -34253.207 (backed up) (switching technique to nr)
http://www.statalist.org/forums/foru...ross-equations
Many thanks in advance!
Tatjana
Comment