Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: duplicates tag - and range


From   ALifschitz@csom.umn.edu
To   statalist@hsphsun2.harvard.edu
Subject   st: duplicates tag - and range
Date   Mon, 19 Feb 2007 18:10:08 -0600

Hi All,

I am working with a very large panel dataset, and would like to tag
observations that repeat annually (compared to the odd, or the unscheduled
observation). My rule for tagging observations is something like: if
another observation falls exactly one year before or after the current
observation (-/+ 3 days, to deal with minor deviations - due to, say, dates
that fall on weekends), tag both observations. I explored the use of
"duplicates" and splitting the dates to year, month, and day to little
effect (it can be used only for exact matches rather ranges, and will tag
similar observations in terms of day and month in non-consecutive years).
Any help would be greatly appreciated.

Arik Lifschitz

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index