Hi all,
Suppose I had data like this:
year month day x1 x2
1979 8 23 0 1
1980 5 23 1 1
1980 6 6 0 0
1981 1 2 1 0
1981 2 20 1 1
...
The data set are ordered by day, month, year, and I want to compute the
difference in days between adjacente rows (nday), so it looks like this:
year month day x1 x2 nday
1979 8 23 0 1 .
1980 5 23 1 1 274
1980 6 6 0 0 14
1981 1 2 1 0 240
1981 2 20 1 1 19
...
Thanks in advance
jose
*
* 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/