Statalist


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

st: Re: panel est with varying coeff over indivs


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Re: panel est with varying coeff over indivs
Date   Thu, 4 Oct 2007 06:24:45 -0400

Only Yong-Seok wants to consider the variation in coefficients over industries random. For that to work, you would have to satisfy the usual assumptions about random effects: they must be independently distributed of X. That may well not be the case.

In a fixed effects context, what you need to do is organize your data in the long structure, where each block is subscripted ij, and then define a new counter

egen unit = group(country industry)

Then you can

tsset unit time

To create industry dummies,

tab industry, gen (IND)

Drop one, and interact each of them with X in a forvalues loop creating x1, x2, ... xg

Then

xtreg y x1-xg , fe

will give you a country-industry fixed effect with an industry- specific coefficient on X.


Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


On Oct 4, 2007, at 2:33 AM, Maarten wrote:


- --- Yong-Seok Choi <[email protected]> wrote:
Could you please help me out in setting the following panel
regression in Stata?

The regression model is

Y_ijt = alpha_ij + beta_j * X_ijt + e_ijt

where i : country j : industry t : time.

That is, alpha_ij is country-industry specific fixed effect and the
coefficient b_j is allowed to vary across industries.
This seems to be a problem for -xtmixed-, see: -help xtmixed-.
*
*   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