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, is already up and running.

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

st: Implement two clusters in panel data

From   Tanja Berg <>
Subject   st: Implement two clusters in panel data
Date   Wed, 20 Jun 2012 10:34:34 +0200

Dear Statalisters,

I have an unbalanced panel data set in the following form

Group		ID		Date			Y		X1		X2		X3
1			1		01.01.2005		...		...		...		...
1			1		02.01.2005		...		...		...		...
1			2		01.01.2005		...		...		...		...
			...		...
2			10		01.01.2005		...		...		...		...
2			10		02.01.2005		...		...		...		...
2			11		01.01.2005		...		...		...		...
...			...

So my panel variable is "ID" and my time variable is "Date".

To find out what type of regression, fixed-effect or random-effect, to use I applied the Hausman Test. This test clearly states that I have to use the fixed-effect estimator.

My problem is now that my data is clustered on the ID and on the Group level. How can I implement this fact in my regression?? Including dummy variables for each Group doesn't work due to collinearity.
Basically the cluster on Group level is of great importance because X1,X2,... are the same for each Group, but I also have to consider the different ID's because the characteristics of each ID are different and so they have different Y.
Is it economically correct to make a regression like follows: xtreg Y X1 X2 X3, fe cluster(Group)
Can I do it that way even if my panel variable is ID??

I would be happy about some suggestions how to solve this!

Thanks a lot!

*   For searches and help try:

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