Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Ronnie Babigumira <rb.glists@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: dummy variable for panel cointegration |
Date | Sun, 24 Jun 2012 18:42:37 +0200 |
This is quite different than your original question (I don't see the "unrecognized" error you say Stata gave). That aside, the more important question is why you want to create dum1 and dum2 instead of using dummy. You may find this helpful http://www.ats.ucla.edu/stat/stata/webbooks/reg/chapter3/statareg3.htm Hope this helps Ronnie -- 010100100110111101101110011011100110100101100101 On Sunday, June 24, 2012 at 6:32 PM, varuna dreepaul wrote: > Thank you for your response. I have used the following commands. > To specify the dummy variable. > Developing countries: 0 > Developed countries: 1 > > . tabulate dummy, generate (dum) > > dummy | Freq. Percent Cum. > ------------+----------------------------------- > 0 | 667 50.00 50.00 > 1 | 667 50.00 100.00 > ------------+----------------------------------- > Total | 1,334 100.00 > > > Then i ran the regression with fixed effect, but the dummies have dropped > xtreg carbon gdp squaregdp gs trade fdi energy polity dum1 dum2, fe > > Fixed-effects (within) regression Number of obs = 950 > Group variable: countries Number of groups = 44 > > R-sq: within = 0.4664 Obs per group: min = 2 > between = 0.8431 avg = 21.6 > overall = 0.8786 max = 27 > > F(6,900) = 131.09 > corr(u_i, Xb) = 0.7548 Prob > F = 0.0000 > > ------------------------------------------------------------------------------ > carbon | Coef. Std. Err. t P>|t| [95% Conf. Interval] > -------------+---------------------------------------------------------------- > gdp | (dropped) > squaregdp | -.1840739 .0221407 -8.31 0.000 -.2275273 -.1406205 > gs | .1325515 .0386822 3.43 0.001 .0566337 .2084693 > trade | .1630736 .0301755 5.40 0.000 .103851 .2222961 > fdi | .0068717 .0051202 1.34 0.180 -.0031772 .0169205 > energy | .8923361 .0518257 17.22 0.000 .7906228 .9940494 > polity | -.0247151 .0254183 -0.97 0.331 -.0746011 .025171 > dum1 | (dropped) > dum2 | (dropped) > _cons | 6.022789 .2686363 22.42 0.000 5.495562 6.550015 > -------------+---------------------------------------------------------------- > sigma_u | .85699844 > sigma_e | .14137961 > > > > On 6/24/12, Ronnie Babigumira <rb.glists@gmail.com (mailto:rb.glists@gmail.com)> wrote: > > Always helps to "tell and show" what you did > > http://www.stata.com/support/faqs/resources/statalist-faq/#question > > > > 3.3 Stata references in your question > > Say exactly what you typed and exactly what Stata typed (or did) in > > response. N.B. exactly! If you can, reproduce the error with one of Stata's > > provided datasets or a simple concocted dataset that you include in your > > posting. > > > > Anyway, here is an example using the auto data and as you can see, it works > > as expected. > > > > sysuse auto > > tab for, gen(source) > > l foreign source1 source2 in 50/55, nolabel > > > > > > > > -- > > 010100100110111101101110011011100110100101100101 > > > > > > > > > > On Sunday, June 24, 2012 at 6:15 PM, varuna dreepaul wrote: > > > > > Dear all, > > > > > > I have 2 set of countries developed and developing countries. I wish > > > to run a panel co-integration regression in which i want to use dummy > > > variable for the developed or developing countries. > > > > > > I have used tabulate and generate function, but it says unrecognized. > > > > > > Can anybody please help me.....for the commands. > > > > > > Thanking you, > > > Varuna > > > * > > > * 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/ > > > > > > > > > > > > * > > * 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/ > > > * > * 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/ * * 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/