Dear All,
I am working with panel data and I found the program xtpattern extremely useful.
Basically, it creates a string variable for each observation with the patterns
you would obtain by "xtdes" (describing) the data, sp say:
1.1..1
indicates that a unit of observation (say, a household) is present on time
periods 1,3 and 6.
What I need now is to know how many contiguous observations there are, so for
instance:
1.1..1 would be zero
111111 would be six
111.11 would be (perhaps) three (the max).
The obvious thing would be to parse through the string generated by xtpattern...
but I couldn't find an elegant way around this problem. Any ideas on this?
Thank you all
best,
***************************
Guillermo Cruces
*
* 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/