Re: [程式] SAS proc means 垂直加總
※ 引述《andersonhaha (好山好水 多健康)》之銘言:
: id condition 1997 1998 1999 2010
: 1 A 0 0 0 1
: 1 B 0 1 1 1
: 1 C 0 0 2 2
: 加總 0 1 3 4
: 2 A
: 2 B .. .. .. .. ..
: [程式範例]:
: proc means data=a sum;
: class id condition;
: var 1997-2010
: output out=b; run; 是這樣嗎?SAS好像跑不太動..(windows full)..
: 謝謝指教!!
id condition y1997 y1998 y1999 y2010
根據你後來打的
proc sort data=a;by id condition;
run;
proc means noprint data=a;
var y1997-y2010;
by id condition;
output out=b(drop=_type_ _freq_) sum=y1997-y2010;
run;
真的 不需要那麼多複雜的語法
還有 noprint 很重要
並不是SAS跑不動
是你視窗滿了 SAS就停住了
--
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.1.127.206
※ 文章網址: https://www.ptt.cc/bbs/Statistics/M.1431488521.A.CC5.html
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 4 之 4 篇):