Hi,
I want to run a regression by two (or several) groups. So, I tried by group: regress y x1 x2 x3. But, I got a message from stata not sorted r(5).
I also tried a second alternative which is regress if group==1 and regress if group==2. And it worked but it's not practical if I need to do it for many groups.
So, the main issue here is about the "not sorted" returned message. And a second issue is about the second alternative used, is it correct!
Thanks.
I want to run a regression by two (or several) groups. So, I tried by group: regress y x1 x2 x3. But, I got a message from stata not sorted r(5).
I also tried a second alternative which is regress if group==1 and regress if group==2. And it worked but it's not practical if I need to do it for many groups.
So, the main issue here is about the "not sorted" returned message. And a second issue is about the second alternative used, is it correct!
Thanks.
Comment