Jun-21-2019, 10:06 AM
I am trying to reproduce this method from a paper and then use it for further investigation, however I am struggling to write the code especially from the second line, any help will be appreciable,
This is the method.
For this study, block periods of 5, 7 and 10 years with a sliding
window of 1 year were selected. For a baseline period of 1980–
2010 and given a 5-year block length, the following subseries are
considered: 1980–1984, 1985–1989, 1990–1994, .... With a sliding
window of one year, the following subseries are produced: 1981–
1985, 1986–1990, 1991–1995....
2. Sort the time series values in descending order for each block
period.
3. Calculate empirical return periods according to the ranks of the
values (n/i, where n and i are the length of block period and
rank, respectively; i = 1 for the highest value).
4. Perform steps 2 and 3 for the baseline period.
5. Calculate relative change as the ratio of the extreme value in the
block period to the extreme value in the baseline period with
the same return period.
6. Calculate perturbation factor for each block period as the aver-age of all relative changes; Then, obtain anomaly values for the
return periods above an extreme threshold (a threshold above
which the values are considered as ‘‘extreme’’).
Thanks in advance
This is the method.
For this study, block periods of 5, 7 and 10 years with a sliding
window of 1 year were selected. For a baseline period of 1980–
2010 and given a 5-year block length, the following subseries are
considered: 1980–1984, 1985–1989, 1990–1994, .... With a sliding
window of one year, the following subseries are produced: 1981–
1985, 1986–1990, 1991–1995....
2. Sort the time series values in descending order for each block
period.
3. Calculate empirical return periods according to the ranks of the
values (n/i, where n and i are the length of block period and
rank, respectively; i = 1 for the highest value).
4. Perform steps 2 and 3 for the baseline period.
5. Calculate relative change as the ratio of the extreme value in the
block period to the extreme value in the baseline period with
the same return period.
6. Calculate perturbation factor for each block period as the aver-age of all relative changes; Then, obtain anomaly values for the
return periods above an extreme threshold (a threshold above
which the values are considered as ‘‘extreme’’).
Thanks in advance