Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Problem with areg, xtreg, xtivreg2 for Fixed-effects model


From   "Schaffer, Mark E" <[email protected]>
To   <[email protected]>
Subject   st: RE: Problem with areg, xtreg, xtivreg2 for Fixed-effects model
Date   Sat, 28 Apr 2007 15:52:53 +0100

Weiwei,
 
> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> [email protected]
> Sent: 28 April 2007 14:51
> To: [email protected]
> Subject: st: Problem with areg, xtreg, xtivreg2 for 
> Fixed-effects model
> 
> Hi,
>     I am estimating a fixed-effect model. In deciding which 
> command to use, I am very struggling with the following problems:
>     areg: does not give me a within R2 that does not include 
> the effects of groups, nor sigma estimates
>     xtreg: not allow me to use -aweight-, nor -cluster- to 
> adjust intragroup correlation (says: insufficient observations)
>     xtivreg2: SE and # of observ are different from -areg- 
> and -xtreg- for the same model (without including -aweight- 
> and -cluster- that xtreg does not allow), and no sigma 
> estimates. However, it does give me the R2 I need.

If -xtivreg2- is reporting a different number of observations, then you
are probably losing observations because of singletons - see my posting
yesterday to Statalist:

http://www.stata.com/statalist/archive/2007-04/msg00925.html

If this is the case, you need to sort this out before proceeding.
Dropping the groups for which you have only one observation is
advisable, since they are dropping out anyway after the transformation
into mean-deviations but the -xtreg- observation count is not reflecting
this.  After that, the SEs and #obs reported by -xtreg- and -xtivreg2-
should match (maybe after using the -small- option for the latter).

--Mark

Prof. Mark Schaffer
Director, CERT
Department of Economics
School of Management & Languages
Heriot-Watt University, Edinburgh EH14 4AS
tel +44-131-451-3494 / fax +44-131-451-3296
email: [email protected]
web: http://www.sml.hw.ac.uk/ecomes

> 
>     I am leaning toward using -areg-. With respect to R2, I 
> understand the difference between areg R2 and xtreg within 
> R2, but could anyone tell me how to decide which R2 is more 
> appropriate to use?  My model is for a panel data with 
> repeated observations for the same individuals. Therefore, 
> the groups are individuals. If the within R2 is more 
> relevant, can I just report the one I got from xtivreg2 
> (-xtreg- does not allow me to use -aweight-, nor -cluster-), 
> disregarding the fact that SE and # of observervation?
>     Secondly, if I use -areg-, how can I get the sigma 
> estimation, as I can get from a -xtreg- command?
>     Thanks in advance for your help!
> 
> 
> 
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index