Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nick Cox <njcoxstata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: SUREG with if command. |
Date | Tue, 25 Sep 2012 12:54:44 +0100 |
Your results show 60 observations with non-missing values; dummy is 0 on 60 of them (all) and so necessarily 1 on 0 (none) of them. Stata's response is reasonable; there are _no_ observations to do your last command. You should perhaps revisit your definition of -dummy-, which doesn't divide the dataset. Nick On Tue, Sep 25, 2012 at 12:42 PM, David Ashcraft <ashcraftd@rocketmail.com> wrote: > Hi Statalist, > > I am trying to run -sureg- with multiple equation as per below. Now I have divided my data based on dummy variable and I want to see if the results are any different based on the dummy variable. Based on my data, I should get three different results i.e. one for the whole sample and two based on the dummy variable. I am getting the same result for the overall sample and where dummy==0 and getting no result for dummy==1. > > I don't understand why I am getting this result. Can anyone help me direct to the solution of this problem. I have looked at some older posts but there is no answer. > Regards > > David > > > > sureg (rp1 rm1)(rp2 rm2)(rp3 rm3)(rp4 rm4)(rp6 rm6)(rp7 rm7)(rp8 rm8)(rp9 rm9), corr > > Seemingly unrelated regression > ---------------------------------------------------------------------- > Equation Obs Parms RMSE "R-sq" chi2 P > ---------------------------------------------------------------------- > rp1 60 1 .0071761 0.9616 3298.70 0.0000 > rp2 60 1 .0092113 0.9465 2534.55 0.0000 > rp3 60 1 .0082266 0.9544 2847.07 0.0000 > rp4 60 1 .0091633 0.9491 2198.62 0.0000 > rp6 60 1 .0084368 0.9515 2677.13 0.0000 > rp7 60 1 .0060539 0.9711 3703.34 0.0000 > rp8 60 1 .009352 0.9866 5504.52 0.0000 > rp9 60 1 .0115533 0.9832 4137.04 0.0000 > ---------------------------------------------------------------------- > > ------------------------------------------------------------------------------ > | Coef. Std. Err. z P>|z| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > rp1 | > rm1 | .9992066 .0173974 57.43 0.000 .9651084 1.033305 > _cons | -.0000674 .0009287 -0.07 0.942 -.0018876 .0017527 > -------------+---------------------------------------------------------------- > rp2 | > rm2 | .9733916 .0193347 50.34 0.000 .9354963 1.011287 > _cons | -.0013549 .001196 -1.13 0.257 -.003699 .0009892 > -------------+---------------------------------------------------------------- > rp3 | > rm3 | .9942406 .0186334 53.36 0.000 .9577198 1.030761 > _cons | -.0008887 .0010727 -0.83 0.407 -.0029911 .0012136 > -------------+---------------------------------------------------------------- > rp4 | > rm4 | .9618481 .0205131 46.89 0.000 .9216431 1.002053 > _cons | .0010966 .0011632 0.94 0.346 -.0011832 .0033765 > -------------+---------------------------------------------------------------- > rp6 | > rm6 | .9920405 .0191732 51.74 0.000 .9544617 1.029619 > _cons | -.0008398 .001099 -0.76 0.445 -.0029937 .0013142 > -------------+---------------------------------------------------------------- > rp7 | > rm7 | .9873097 .016224 60.86 0.000 .9555113 1.019108 > _cons | .0001045 .0007886 0.13 0.895 -.0014411 .0016502 > -------------+---------------------------------------------------------------- > rp8 | > rm8 | .9554066 .0128774 74.19 0.000 .9301673 .9806458 > _cons | .0009302 .0012033 0.77 0.439 -.0014282 .0032887 > -------------+---------------------------------------------------------------- > rp9 | > rm9 | .9889603 .0153757 64.32 0.000 .9588245 1.019096 > _cons | -.0001408 .0014852 -0.09 0.924 -.0030518 .0027703 > ------------------------------------------------------------------------------ > > Correlation matrix of residuals: > > rp1 rp2 rp3 rp4 rp6 rp7 rp8 rp9 > rp1 1.0000 > rp2 0.1214 1.0000 > rp3 0.2210 0.9609 1.0000 > rp4 0.4345 -0.0342 0.0495 1.0000 > rp6 0.2268 0.9595 0.9982 0.0447 1.0000 > rp7 0.9088 0.2710 0.3749 0.7114 0.3763 1.0000 > rp8 0.2240 0.0839 0.0896 -0.0739 0.0987 0.1232 1.0000 > rp9 0.2100 0.1163 0.1462 -0.0321 0.1497 0.1600 0.7653 1.0000 > > Breusch-Pagan test of independence: chi2(28) = 338.778, Pr = 0.0000 > > . sureg (rp1 rm1)(rp2 rm2)(rp3 rm3)(rp4 rm4)(rp6 rm6)(rp7 rm7)(rp8 rm8)(rp9 rm9)if dummy==0, corr > > Seemingly unrelated regression > ---------------------------------------------------------------------- > Equation Obs Parms RMSE "R-sq" chi2 P > ---------------------------------------------------------------------- > rp1 60 1 .0071761 0.9616 3298.70 0.0000 > rp2 60 1 .0092113 0.9465 2534.55 0.0000 > rp3 60 1 .0082266 0.9544 2847.07 0.0000 > rp4 60 1 .0091633 0.9491 2198.62 0.0000 > rp6 60 1 .0084368 0.9515 2677.13 0.0000 > rp7 60 1 .0060539 0.9711 3703.34 0.0000 > rp8 60 1 .009352 0.9866 5504.52 0.0000 > rp9 60 1 .0115533 0.9832 4137.04 0.0000 > ---------------------------------------------------------------------- > > ------------------------------------------------------------------------------ > | Coef. Std. Err. z P>|z| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > rp1 | > rm1 | .9992066 .0173974 57.43 0.000 .9651084 1.033305 > _cons | -.0000674 .0009287 -0.07 0.942 -.0018876 .0017527 > -------------+---------------------------------------------------------------- > rp2 | > rm2 | .9733916 .0193347 50.34 0.000 .9354963 1.011287 > _cons | -.0013549 .001196 -1.13 0.257 -.003699 .0009892 > -------------+---------------------------------------------------------------- > rp3 | > rm3 | .9942406 .0186334 53.36 0.000 .9577198 1.030761 > _cons | -.0008887 .0010727 -0.83 0.407 -.0029911 .0012136 > -------------+---------------------------------------------------------------- > rp4 | > rm4 | .9618481 .0205131 46.89 0.000 .9216431 1.002053 > _cons | .0010966 .0011632 0.94 0.346 -.0011832 .0033765 > -------------+---------------------------------------------------------------- > rp6 | > rm6 | .9920405 .0191732 51.74 0.000 .9544617 1.029619 > _cons | -.0008398 .001099 -0.76 0.445 -.0029937 .0013142 > -------------+---------------------------------------------------------------- > rp7 | > rm7 | .9873097 .016224 60.86 0.000 .9555113 1.019108 > _cons | .0001045 .0007886 0.13 0.895 -.0014411 .0016502 > -------------+---------------------------------------------------------------- > rp8 | > rm8 | .9554066 .0128774 74.19 0.000 .9301673 .9806458 > _cons | .0009302 .0012033 0.77 0.439 -.0014282 .0032887 > -------------+---------------------------------------------------------------- > rp9 | > rm9 | .9889603 .0153757 64.32 0.000 .9588245 1.019096 > _cons | -.0001408 .0014852 -0.09 0.924 -.0030518 .0027703 > ------------------------------------------------------------------------------ > > Correlation matrix of residuals: > > rp1 rp2 rp3 rp4 rp6 rp7 rp8 rp9 > rp1 1.0000 > rp2 0.1214 1.0000 > rp3 0.2210 0.9609 1.0000 > rp4 0.4345 -0.0342 0.0495 1.0000 > rp6 0.2268 0.9595 0.9982 0.0447 1.0000 > rp7 0.9088 0.2710 0.3749 0.7114 0.3763 1.0000 > rp8 0.2240 0.0839 0.0896 -0.0739 0.0987 0.1232 1.0000 > rp9 0.2100 0.1163 0.1462 -0.0321 0.1497 0.1600 0.7653 1.0000 > > Breusch-Pagan test of independence: chi2(28) = 338.778, Pr = 0.0000 > > . sureg (rp1 rm1)(rp2 rm2)(rp3 rm3)(rp4 rm4)(rp6 rm6)(rp7 rm7)(rp8 rm8)(rp9 rm9)if dummy==1, corr > insufficient observations > r(2001); > * * 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/