经管之家首页 答疑首页 SAS 请教如何查找和处理时间割断(gap),谢谢!
  • 统计与数据分析
  • 经济学
  • 管理学
  • 金融学
  • 财会类
  • 国际贸易类
  • 考研考博与考证
  • 找数据和资料
  • 求职与职场
  • 学术与投稿类
  • 社会生活
  • 其它
请教各位高手,对于本来应该是连续时间的数据,出现了割断(gap),如何查找数据中是否存在割断并对割断点处加入新的观测数据?
形如下列数据,在01AUG07:21:00:00处出现了割断。
现在的想法是产生一个连续的时间数据集,如01AUG07:00:00:00——02AUG07:23:00:00,然后对割断的数据进行update。不过,感觉这样做思路不太对。能否直接对数据集进行操作,如判断DIF是否为3600等方法来进行查找?
烦请各位高手指点,多谢了!
............
01AUG07:17:00:00 01AUG07 17:00:00 1
01AUG07:18:00:00 01AUG07 18:00:00 2
01AUG07:19:00:00 01AUG07 19:00:00 1
01AUG07:20:00:00 01AUG07 20:00:00 3
01AUG07:22:00:00 01AUG07 22:00:00 4
01AUG07:23:00:00 01AUG07 23:00:00 1
02AUG07:00:00:00 02AUG07 0:00:00 1
02AUG07:01:00:00 02AUG07 1:00:00 5
02AUG07:02:00:00 02AUG07 2:00:00 1
02AUG07:03:00:00 02AUG07 3:00:00 1
...........
<script type="text/javascript"></script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"></script>
marloneusa
回答于 2008/03/13 05:30
generate a variable by substract the date and time [any range]. and
then generate another variable based on your date and time. sort the dataset based the variable you created and merge those
two dataset by those variables and then you will see the gaps.
 加载中...