Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: xt commands with three way panel data


From   Abhradeep Maiti <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: xt commands with three way panel data
Date   Wed, 16 Oct 2013 23:35:46 +0000

This might work:

Create region-industry combination. Each region-industry combination becomes a cross-section.

egen pan_id = group(region industry)
xtset pan_id year

Then loop over all the industries.

forval i = 1/n {
xtreg Y X if industry==`i', fe

} 


Thanks & Regards,
Abhradeep Maiti




________________________________________
From: [email protected] [[email protected]] on behalf of John Francis [[email protected]]
Sent: Wednesday, October 16, 2013 4:35 PM
To: [email protected]
Subject: st: xt commands with three way panel data

Im using a panel dataset with two cross-sectional dimensions (industry(i)
and region(r)) and one time dimension (year (t)).  I am estimating a model
with fixed effects for all three dimensions:

                Y_irt = constant + b*X_irt + f_i + f_r + f_t + error

where X are explanatory variables and the f’s are the fixed effects.  This
is straightforward to do using either reg or areg.  However, I would like to
utilize stata’s suite of xt commands in my estimation (e.g. xtserial,
xtregar, xtabond, etc…).  My first thought was to demean over the industry
dimension.  However, after doing this there are multiple observations per
region per year which means I can’t xtset the data.  Is there any way to
overcome this to utilize the xt commands?  Any help will be greatly
appreciated.



John Francis
Louisiana Tech University
[email protected]





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index