Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Retrieving coefficients using the xtreg command


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Retrieving coefficients using the xtreg command
Date   Wed, 04 May 2005 16:23:47 -0400

If you checked help xtreg, you would find that :

predict fixeff, u

should generate the fixed effects in variable fixeff.

You could then:

bysort firmid: keep if _n==1
keep firmid fixeff

and that would create a dataset with just the fixed effects for each firmid

Michael Blasnik
[email protected]

----- Original Message ----- From: "John de Figueiredo" <[email protected]>
To: <[email protected]>
Sent: Wednesday, May 04, 2005 4:04 PM
Subject: st: Retrieving coefficients using the xtreg command



I'm using Stata8.

I want to run a fixed effects (on firmid) regression using the xtreg command. There are 10000 firms.
I then want to used the fixed effects coefficients as dependent variables in a second regression (see David Card, Alan Krueger, Journal of Political Economy, 1992, for example).

I run the regression:

xtreg expend sales rd advertise, fe i(firmid)

Is there a way to retrieve the fixed effects coefficients for each of the 10000 firms using the xtreg command?

If not, is there a way to use the xi:regress command and force it to omit a particular reference case (firmid==10) in order to get the coefficients?

Is there a different (easier) way to do this?

Thanks
John
*
*   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