由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - SAS quarter calculation question
相关主题
SAS QUESTION:how to capture the last nonmissing observation?do loop 的一道题
keep group of values of SQL procedure in one table (转载)in =option的一道题
SAS问题请教:Numeric Variable Length的设定syntax errors
包子问,SAS里data long to wide format请教一道SAS Base的问题
新人报道,兼问SAS data set的问题Import excel file to sas (the first 8 or more observations
SAS format 的问题在SAS里面如何进行数组操作?
sas base 70 第 20题求问一道SAS adv 题
A SAS problem一个sas base问题不明白,请教
相关话题的讨论汇总
话题: value1话题: quarter话题: value3话题: value2
进入Statistics版参与讨论
1 (共1页)
t********1
发帖数: 799
1
there is a table with different variables as below,
yyyymmm, value1(%), value2(%), value3(%), .......
now I need to calculate every three observations' accummulated percent, i.e.
quarterly accummulated percent for value1,value2, value3,.....
How can I realize this? Thank you very much.
d******9
发帖数: 404
2
First group the date variable yyyymmm into 4 quarters, then roll up to the
analysis variables Value1-3 to the quarter level.
d******9
发帖数: 404
3
For example,use Format to group first
Proc Format;
Value Quarter
m1-m2='Q1'
m2-m3='Q2'
m3-m4='Q3'
m4-m5='Q4';
run;
Data B;
Set A;
quarter=put(yyymmm, quarter.);
run;
proc sql;
create table C as
select quarter, sum(value1) as CV1, sum(value2) as CV2, sum(value3) as CV3
from B
group by quarter;
quit;
t********1
发帖数: 799
4
thank you so much. Baozi is sent.

【在 d******9 的大作中提到】
: For example,use Format to group first
: Proc Format;
: Value Quarter
: m1-m2='Q1'
: m2-m3='Q2'
: m3-m4='Q3'
: m4-m5='Q4';
: run;
: Data B;
: Set A;

1 (共1页)
进入Statistics版参与讨论
相关主题
一个sas base问题不明白,请教新人报道,兼问SAS data set的问题
sas一问SAS format 的问题
请教如何这样保存数据 SASsas base 70 第 20题
在SAS中如何寻找到包含特定value的variable(s)A SAS problem
SAS QUESTION:how to capture the last nonmissing observation?do loop 的一道题
keep group of values of SQL procedure in one table (转载)in =option的一道题
SAS问题请教:Numeric Variable Length的设定syntax errors
包子问,SAS里data long to wide format请教一道SAS Base的问题
相关话题的讨论汇总
话题: value1话题: quarter话题: value3话题: value2