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

st: Re: panel est with varying coeff over indivs

From   Kit Baum <>
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


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
An Introduction to Modern Econometrics Using Stata:

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

- --- Yong-Seok Choi <> 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:

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