我即是英文盲又是中文盲, 我的问题大家不太容易看懂, 但我还是要再次请教各位。
我有一个data set.
name date ret
A 10/11/10 0.5
A 11/11/10 0.8
A 12/11/10 0.9
B 10/11/10 0.7
B 11/11/10 1.0
B 12/11/10 0.8
我现在要求A 在10/11/10的'ret'平均值, 即(0.5+0.8+0.9)/3
A在10/11/10的‘ret'平均值, 即(0.8+0.9)/2, 同样也求B在这两个时间点的'ret'平均值。当然我的DADASET 比这大太多,我不知道是否说清楚了。 我想是否应该用first.variable 和Macro,但不知从何下手。拜请赐教!谢谢!
回复:亲爱的SAS 互助组的朋友们,请帮帮忙
所有跟帖:
•
回复:回复:亲爱的SAS 互助组的朋友们,请帮帮忙
-mylittlehome-
♀
(16 bytes)
()
07/13/2010 postreply
16:01:52
•
rolling average calculation, proc summary 应该行不通
-Janezhu-
♀
(0 bytes)
()
07/13/2010 postreply
16:53:32
•
Oops, misunderstood what you wanted. try proc sql.
-mylittlehome-
♀
(0 bytes)
()
07/13/2010 postreply
19:57:41
•
还是看不懂
-暖小蛇-
♀
(283 bytes)
()
07/13/2010 postreply
17:11:16
•
是三个date. 在第一个date 求三个ret 值的平均值, 在第二个date, 求后两个ret值的平均值
-Janezhu-
♀
(0 bytes)
()
07/13/2010 postreply
17:34:27
•
ok,我这样解释,你看对不对
-暖小蛇-
♀
(257 bytes)
()
07/13/2010 postreply
17:48:32
•
太对了, 谢谢!
-Janezhu-
♀
(0 bytes)
()
07/13/2010 postreply
18:41:54
•
here
-暖小蛇-
♀
(402 bytes)
()
07/13/2010 postreply
19:24:05
•
another try
-暖小蛇-
♀
(405 bytes)
()
07/13/2010 postreply
19:34:17
•
谢谢!非常感谢! 你太可爱了
-Janezhu-
♀
(0 bytes)
()
07/13/2010 postreply
19:48:15
•
回复:回复:亲爱的SAS 互助组的朋友们,请帮帮忙
-BDL-
♂
(527 bytes)
()
07/13/2010 postreply
17:36:03
•
proc sql? I'll try it, thank you very much!
-Janezhu-
♀
(0 bytes)
()
07/13/2010 postreply
18:44:27