SAS中文论坛

标题: 请教缺失值处理的问题,谢谢。 [打印本页]

作者: shiyiming    时间: 2008-11-29 00:57
标题: 请教缺失值处理的问题,谢谢。
请教各位,如何实现对于缺失值,用与该值等间隔的其他非缺失值的平均值替代。
假设数据以3为周期,则缺失值部分以所有周期中对应点中的非缺失值的平均值来替代,即缺失值1为(3+6+9)/3=6,缺失值2、3均为(4+7)/2=5.5。

. <-缺失值1
. <-缺失值2
2
3
4
5
6
7
8
9
. <-缺失值3
10

有更好的对于此类周期型数据的缺失值处理方法,也烦请指教。
多谢。
作者: shiyiming    时间: 2008-12-3 01:34
标题: Re: 请教缺失值处理的问题,谢谢。
Just compute the average by mod(_N_,3) or mod(monotonic(), 3), then substitute.
I don't have any suggestions in general. I tend to get rid of all missing values when I feel blue.
作者: shiyiming    时间: 2008-12-7 23:48
标题: Re: 请教缺失值处理的问题,谢谢。
Thanks,urchin.
The type of the data is time-series, so it's probably not appropriate just getting rid of the missing values.




欢迎光临 SAS中文论坛 (https://mysas.net/forum/) Powered by Discuz! X3.2