counting periods after marked dates
Posted: Wed Aug 04, 2010 11:46 am
I am new to Eviews programming (with Eviews 6) and I have the following question:
I have time series data with events on certain dates marked by 0's and 1's. I would like to count the number of time periods between each event. For example, I would like the first period after an event to be 1, the second period 2, etc., until the next event when the count will reset at 0. Is there a way to do this? I have tried using loops and if/then logic but have been unsuccessful.
Thank you.
I have time series data with events on certain dates marked by 0's and 1's. I would like to count the number of time periods between each event. For example, I would like the first period after an event to be 1, the second period 2, etc., until the next event when the count will reset at 0. Is there a way to do this? I have tried using loops and if/then logic but have been unsuccessful.
Thank you.