Statalisters,
I have a problem identifying compliant vs. non-compliant periods in
patients? prescription history. I assume that this type of problems is
known from other areas with temporal sequences (climate, transactional,
reoffending, etc.).
How would it be possible to flag and number a) coherent periods of
prescriptions; b) gaps; c) beginning dates; and d) end dates to each
period?
Example (with two clearly separated periods):
order day
1 0
2 29
3 57
4 89
5 114
6 293
7 309
8 342
9 363
10 407
11 434
12 461
Any advice or suggestions will be much appreciated.
Jakob Petersen
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/