Haizhen,
> -----Original Message-----
> From:
[hidden email]
> [mailto:
[hidden email]] On Behalf Of Haizhen Lin
> Sent: 01 December 2008 19:50
> To:
[hidden email]
> Subject: st: xtivreg2, xtreg , panels are not nested within clusters
>
> Dear members,
>
> My unit is market-year and I want to cluster at state-year level. I
> tired to use xtreg, cluster at state-year level, it provides error
> "panels are not nested within clusters". What does the error mean?
I don't understand your case (market, state, year), but here are some
illustrative examples.
Say your panels were states. You could cluster by regions (groups of
states), because all observations in one panel (a state) are also all in
the same cluster (a region). This is what is meant by "panels are
nested within clusters".
You could cluster by state, because again all observations in one panel
(a state) are also in the same cluster (the very same state).
But you could not cluster by year, because some observations in one
panel (say State X) might be found in one cluster (say 2001) and some
others from the same panel (again State X) could be found in a different
cluster (say 2002).
Hope this helps.
Cheers,
Mark (-xtivreg2- author)
--
Heriot-Watt University is a Scottish charity
registered under charity number SC000278.
*
* For searches and help try:
*
http://www.stata.com/help.cgi?search*
http://www.stata.com/support/statalist/faq*
http://www.ats.ucla.edu/stat/stata/