data=lsh
date temperatuer week
2001-1-1 31 1
2001-1-2 33 1
2001-1-8 30 2
以上是数据格式,日期和每天的最高温度,想要定义发生极端热的事件(变量名:highwave),如下是定义方法:每天最高温度超过平均最高温度的90th,95th and 98th 百分位数,至少连续2天、三天和四天(如下表)。
热事件 percentile duration
1 90th(30.38) 2
2 90th 3
3 90th 4
4 95th(31.32) 2
5 95th 3
6 95th 4
7 98th(32.52) 2
8 98th 3
4 98th 4
想知道如何编写定义热事件的sas code并知道每周发生了几次热事件
想了很久不知道怎么写code, 多谢!