My problem is that -xtdes- says my two key variables do not together
uniquely identify the cases in my large panel data set, but both the Stata
code I wrote to identify the duplicates, and SPSS's automatically generated
syntax to "find duplicates" (operating on a precursor data set with the
same cases and variables) say there are no duplicates.
Searching the FAQs on "xtdes" produced no hits.
Specifics:
1) I have 1,322,511 cases. The data set is about 700 MB. Memory
allocated is 1.4GB (and wasn't it a kick in the fatoozle to discover that's
all WinXP will let me allocate from the 4 GB on my system!).
2) I first did -tsset- using DRVNUM (employee id) and CDATE (paycheck date).
3) -xtdes- message:
DRVNUM: 10001, 10003, ..., 99051 n
= 28946
CDATE: 15344, 15351, ..., 16072 T
= 105
Delta(CDATE) = 7; (16072-15344)/7 + 1 = 105
(DRVNUM*CDATE does not uniquely identify observations)
4) Stata Code run on data to find duplicates:
. gsort +DRVNUM +CDATE, generate(DriverWeek)
. generate DupDriverWeekFlag=0
. replace DupDriverWeekFlag = 1 if ( DRVNUM == DRVNUM[_n-1] & CDATE ==
CDATE[_n-1] )
(0 real changes made)
5) -summarize- run on DupDriverWeekFlag says min and max are both 0.
I suspect I must have forgotten or be confused about something simple, so I
hope I am not too embarrassed when someone points out what it is . . .
Thanks,
Steve
--------------------------------------------------
*Stephen V. Burks, Ph.D.
*Assistant Professor of Economics and Management
*University of Minnesota, Morris
*
*Division of Social Sciences
*600 East 4th Street
*Morris, MN 56267-2134
*
*Voice: (320) 589-6191
*Division Staff: (320) 589-6200
*FAX: (320) 589-6117
*E-Mail: [email protected]
*
* "Striving to be the Best National
* Public Liberal Arts College in the U.S."
---------------------------------------------------
--------------------------------------------------
*Stephen V. Burks, Ph.D.
*Assistant Professor of Economics and Management
*University of Minnesota, Morris
*
*Division of Social Sciences
*600 East 4th Street
*Morris, MN 56267-2134
*
*Voice: (320) 589-6191
*Division Staff: (320) 589-6200
*FAX: (320) 589-6117
*E-Mail: [email protected]
*
* "Striving to be the Best National
* Public Liberal Arts College in the U.S."
---------------------------------------------------
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/