dear forum users,
I have a problem, a have panel data and I need to delete time periods which do not have 24 month consecutive observations in my case returns (variable). I made via tsspell a variable which shows the sequence and starts all over again if the sequence is interrupted by a missing variable. Now I would like to count the sequence and report beside the sequence the total sum from the beginning of the sequence, how could I achieve this. Note the sequence starts also all over again within the panels. so I need this
sequence new varaible sum of sequence but for each sequence
1 10
2 10
3 10
4 10
1 15
2 15
3 15
4 15
5 15
I have a problem, a have panel data and I need to delete time periods which do not have 24 month consecutive observations in my case returns (variable). I made via tsspell a variable which shows the sequence and starts all over again if the sequence is interrupted by a missing variable. Now I would like to count the sequence and report beside the sequence the total sum from the beginning of the sequence, how could I achieve this. Note the sequence starts also all over again within the panels. so I need this
sequence new varaible sum of sequence but for each sequence
1 10
2 10
3 10
4 10
1 15
2 15
3 15
4 15
5 15
Comment