How to calculate the number of block of data
Posted: Thu Nov 30, 2017 3:48 pm
Hi,
I need help to determine the number of blocks of signal within a series.
I have first initiate zero value for the series,
smpl 1970w1 @now
series signal = 0
and then based upon certain rule, I have assigned value of -1, -05, 0, 0.5 and I to the series.
Normalement there is a trend in the value, the value change from 0 to 1 and stay for a while then back to 0 and then it might go to -1 for a while and so on.
For example, let say, the signal stay zero from 1970 to 1970 and then go to 1 for six weeks and then go to -1 for 10 weeks and get back to zero for another 10 weeks and again change value, and so on.
1: I would like to know how many times the signal changes values.
2: I would like to know how many times the signal changes value to 1
3: What was the maximum times that the signal stay 1
4: What was the minimum times that the signal stay 1
5: What was the average times that the signal stay 1
Thanks for yours help.
I need help to determine the number of blocks of signal within a series.
I have first initiate zero value for the series,
smpl 1970w1 @now
series signal = 0
and then based upon certain rule, I have assigned value of -1, -05, 0, 0.5 and I to the series.
Normalement there is a trend in the value, the value change from 0 to 1 and stay for a while then back to 0 and then it might go to -1 for a while and so on.
For example, let say, the signal stay zero from 1970 to 1970 and then go to 1 for six weeks and then go to -1 for 10 weeks and get back to zero for another 10 weeks and again change value, and so on.
1: I would like to know how many times the signal changes values.
2: I would like to know how many times the signal changes value to 1
3: What was the maximum times that the signal stay 1
4: What was the minimum times that the signal stay 1
5: What was the average times that the signal stay 1
Thanks for yours help.