由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - HELP!!!!!
相关主题
how to output cumulative percent to a dataset from Proc Freq?新手上路: normal cumulative function in C
How to plot log cumulative hazard output in SAS有谁知道怎么近似计算Cumulative Hypergeometric Distribution吗?
SAS helpsas问题
怎么去读proc genmod的output(关于multinomial)Gamma Inverse cumulative distribution Formula or algorithm
Ask a question---About SAS 9.2 proc phreg Assess statement请教一个SAS小问题:如何得到 one cumulative varialbe of character variable?
新人拜山,请教做SAS programmer主要用哪些procedure?请教SAS macro - please help, still not resolved
asking for help with Proc SurveySelect again (THANK YOU !!!)幼儿园分水果的SAS问题
a question[合集] 统计问题求助!有偿,价格可议。
相关话题的讨论汇总
话题: do话题: sum话题: new话题: what话题: 80%
进入Statistics版参与讨论
1 (共1页)
S*****A
发帖数: 44
1
What I want do is to cumulate the A until is great than 80% of sum.
proc new;
set new;
retain AS;
AS=AS+A ;
DO until ( AS>= .8*sum(A) );
end;
run;
but, it runs forever!!! I do not think it takes that long to just get the
cumulative sum.
Help me ~~~
b******e
发帖数: 539
2
the do loop in SAS is not the same as in other languages
besides, what do you want to do after it accumulates to 80%
anyway, here is something you can do:
first, get the total of A:
proc sql noprint;
select sum(A) into :total_A from new;
quit;
then get a data set that contains obs with accumulated A <= 80%:
data new;
set new;
retain C 0;
c = c + a;
if c <= 0.8*&total_a then output;
run;
1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] 统计问题求助!有偿,价格可议。Ask a question---About SAS 9.2 proc phreg Assess statement
A question about mean, variance, and distribution function.新人拜山,请教做SAS programmer主要用哪些procedure?
请教: meaning of Ф(number) in statistics?asking for help with Proc SurveySelect again (THANK YOU !!!)
SAS问题求教a question
how to output cumulative percent to a dataset from Proc Freq?新手上路: normal cumulative function in C
How to plot log cumulative hazard output in SAS有谁知道怎么近似计算Cumulative Hypergeometric Distribution吗?
SAS helpsas问题
怎么去读proc genmod的output(关于multinomial)Gamma Inverse cumulative distribution Formula or algorithm
相关话题的讨论汇总
话题: do话题: sum话题: new话题: what话题: 80%