+-------+ ----+ Title +------------------------------------------------------------
xtidt: Create Identification Panel Data Variables
+--------+ ----+ Syntax +----------------------------------------------------------- xtidt [if] [in] , id(#) t(#) year(varname) panel(varname) [ time(varname) dumcs(prefix) dumts(prefix) list ]
+---------+ ----+ Options +----------------------------------------------------------
id(#) Number of Cross Sections
t(#) Number of Years
panel(varname) Name of ID Cross Sections variable
year(varname) Name of ID years variable
time(varname) Time Trend variable
dumcs(new_varlist) Cross Section Dummy Variables (Prefix name)
dumts(new_varlist) Time Series Dummy Variables (Prefix name)
list Display Panel and Time ID Variables
+-------------+ ----+ Description +------------------------------------------------------
xtidt Create Identification Panel Data Variables for using in xtreg regression.
+----------+ ----+ Examples +---------------------------------------------------------
clear all
db xtidt
xtidt , id(2) t(3) panel(id) year(year) time(time) list
xtidt , id(2) t(4) panel(id) year(year) time(time) list
xtidt , id(3) t(4) panel(id) year(year) time(time) list xtidt , id(4) t(3) panel(id) year(year) time(time) list xtidt , id(3) t(5) panel(id) year(year) time(time) list
xtidt , id(3) t(5) panel(id) year(year) time(time) dumcs(Cs) dumts(Ts) > list
list id year time Cs1 Cs2 Cs3 Ts1 Ts2 Ts3 Ts4 Ts5 xtset id year
list
+------------------------------------------------------------------+ | id year time Cs1 Cs2 Cs3 Ts1 Ts2 Ts3 Ts4 Ts5 | |------------------------------------------------------------------| 1. | 1 1 1 1 0 0 1 0 0 0 0 | 2. | 1 2 2 1 0 0 0 1 0 0 0 | 3. | 1 3 3 1 0 0 0 0 1 0 0 | 4. | 1 4 4 1 0 0 0 0 0 1 0 | 5. | 1 5 5 1 0 0 0 0 0 0 1 | |------------------------------------------------------------------| 6. | 2 1 6 0 1 0 1 0 0 0 0 | 7. | 2 2 7 0 1 0 0 1 0 0 0 | 8. | 2 3 8 0 1 0 0 0 1 0 0 | 9. | 2 4 9 0 1 0 0 0 0 1 0 | 10. | 2 5 10 0 1 0 0 0 0 0 1 | |------------------------------------------------------------------| 11. | 3 1 11 0 0 1 1 0 0 0 0 | 12. | 3 2 12 0 0 1 0 1 0 0 0 | 13. | 3 3 13 0 0 1 0 0 1 0 0 | 14. | 3 4 14 0 0 1 0 0 0 1 0 | 15. | 3 5 15 0 0 1 0 0 0 0 1 | +------------------------------------------------------------------+
This example is taken from: Greene, William (2012) "Econometric Analysis", 7th ed., Prentice Hall Publishing Company Inc., New York, USA.; 368-377.
clear all
sysuse xtidt.dta , clear
xtidt, t(7) id(595) year(t) panel(id)
xtreg lwage exp exp2 wks occ ind south smsa ms union ed fem blk , re xtreg lwage exp exp2 wks occ ind south smsa ms union ed fem blk , fe
xtreg lwage exp exp2 wks occ ind south smsa ms union , fe est store LM_Fixed
xtreg lwage exp exp2 wks occ ind south smsa ms union , re hausman LM_Fixed
xttest0
+-----------------+ ----+ Acknowledgments +--------------------------------------------------
I would like to thank Professor Christopher F Baum, for his help during desig > n this module.
+--------+ ----+ Author +-----------------------------------------------------------
Emad Abd Elmessih Shehata Assistant Professor Agricultural Research Center - Agricultural Economics Research Institute - Eg > ypt Email: emadstat@hotmail.com WebPage: http://emadstat.110mb.com/stata.htm WebPage at IDEAS: http://ideas.repec.org/f/psh494.html WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm
http://econpapers.repec.org/software/bocbocode/S457363.htm
http://ideas.repec.org/c/boc/bocode/s457363.html
+----------------+ ----+ xtidt Citation +---------------------------------------------------
Shehata, Emad Abd Elmessih (2011) "XTIDT: Stata Module to Create Identification Panel Data Variables"