Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: st: re: binary variables


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: re: binary variables
Date   Thu, 3 Jun 2010 17:31:47 +0200

<> 

" The "xtreg" command works very well, although I am still not sure about 
the disadvantages of a fixed effects model. And still the problem will 
remain when I want to explain the differences between regions."



The most prominent disadvantage is that you cannot estimate the effect of
covariates which are constant within panel units. I recommend you look at
the intro in manual [XT], page 446.



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Natalie Trapp
Gesendet: Donnerstag, 3. Juni 2010 17:17
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: re: binary variables

Thank you so much for all the comments. They were very helpful.

@Martin: I am not so convenient with Stata, so I haven't found out all 
the tools yet. Though I made the dofile, which generates the binary 
variables, with the GAMS program; so it wasn't much work.

@ Maarten: Ile de France, in my dataset is not Paris only but also the 
districts surrounding the city, so I do have 94 observations in this 
region. Other regions that are not omitted may have even less 
observations, or regions that are omitted may have many more 
observations. This wouldn't explain why Stata omits these variables.

I think the "areg" command is not appropriate as I have several 
different crops growing on one farm, so that I have several observations 
for one individual and included an indicator for each individual.

The "xtreg" command works very well, although I am still not sure about 
the disadvantages of a fixed effects model. And still the problem will 
remain when I want to explain the differences between regions.

Maybe there is a similarity between some regions that are not obvious, 
so I have to aggregate some regions.

So, thank you very much once again. You gave me many more ideas!
Natalie

On 6/3/2010 11:58 AM, Christopher Baum wrote:
> <>
> Natalie said
>
> I also couldn't sort out how to make the "xtreg" command work. It gives
> me the error "not sorted r(5);", even when I sorted the data and then
> typed the "xtreg" command (maybe because there are too many variables or
> maybe because I have cross sectional data?!).
>
>
> I imagine you tried to include those explicit region variables (Saarland
Brandenburg MeckPomm Sachsen, etc.)  in xtreg, fe. You can't include region
dummies and fit a fixed effects model.  All you need to do is
>
> xtreg depvar indepvars, fe i(REGION)
>
> and Stata will fit the model using the within transformation (equivalent
to including dummies for each REGION).
>
> To see that this works:
>
> webuse grunfeld
> tsset, clear
> xtreg invest mvalue kstock, i(company) fe
>
> Note that the sort order does not matter. You can randomly sort the
observations in the dataset and the above FE model
> will still work.
>
> Kit
>
> Kit Baum   |   Boston College Economics&  DIW Berlin   |
http://ideas.repec.org/e/pba1.html
>                              An Introduction to Stata Programming  |
http://www.stata-press.com/books/isp.html
>   An Introduction to Modern Econometrics Using Stata  |
http://www.stata-press.com/books/imeus.html
> *
> *   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index