作者thomas2005 (無)
看板Statistics
標題[程式] SAS 寫出簡潔的程式碼
時間Mon May 13 00:29:52 2013
[軟體程式類別]:
SAS
[程式問題]:
資料處理
[軟體熟悉度]:
低(1~3個月)
[問題敘述]:
目前想把我的程式碼整理的更簡潔,有下以兩種。
想麻煩各位給我一個方向。
1. lag1(), lag2,...,lagn()
2.底下三行, mv_level 、payout_ratio 、traditional_industry 。
這三個變數的排列組合,總共有七個組合 C(3,3)+C(3,2)+C(3,1)=7 。
程式碼如何寫成可以直接取代這三種變數的方式?
PROC REG data=capm_report outest=capm_report_test1 TABLEOUT;
model stock_return=capm16 mv_level payout_ratio traditional_industry;
RUN;
謝謝各位。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 1.172.189.154
→ thomas2005:忘了寫 lagn 的說明,目前我想寫出 lag(i)。就能自動執 05/13 00:30
→ thomas2005:行 i 次的方式。 05/13 00:31
推 imaltar:用macro 05/13 10:07
推 tew:x1 x2 x3 x4 x5 你就用label就好 05/13 12:53
→ thomas2005:想問 tew 大你講的 label 是什麼意思?謝謝。 05/13 15:44