討論串[程式] SAS資料計算
共 7 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓2(2推 0噓 2→)留言4則,0人參與, 最新作者tew (咖啡王子)時間15年前 (2010/06/27 23:35), 編輯資訊
0
0
0
內容預覽:
借用liton的語法. 我把他改出來了. 稍微修正就可以了. data a;. set a;. retain o 0;. if response^=lag(response) then o=o+1;. run;. proc sql;. create table final as. select da
(還有41個字)

推噓1(1推 0噓 1→)留言2則,0人參與, 最新作者liton (歐吉桑留學生)時間15年前 (2010/06/27 16:12), 編輯資訊
0
0
0
內容預覽:
我程式的就兩段. 借用t大的資料data c;. set a;. retain initial_date group 0;. format initial_date date9. ;. if response ne 1 and response ne lag(response) then initi
(還有149個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者socery (keep going!)時間15年前 (2010/06/26 15:32), 編輯資訊
0
0
0
內容預覽:
我的做法,參考一下囉~~~. 資料:. data survial;input date date10. response;. cards;. 09AUG07 1. 23AUG07 1. 06SEP07 2. 20SEP07 2. 05OCT07 1. 16OCT07 1. 30OCT07 2. 29
(還有390個字)

推噓0(0推 0噓 4→)留言4則,0人參與, 最新作者tew (咖啡王子)時間15年前 (2010/06/26 11:58), 編輯資訊
0
0
0
內容預覽:
以下我做了一個假設. 有兩個人 觀察到4~5種情況. 其中 第二種情況 會只出現一次. 然後 在這樣的情境下. 不用刻意針對 出現 第三種 第四種的情況做處理. 只要能讓SAS辨認不同情況為何就可以了. 不過你資料有幾筆. 只要都是按照ID 事發順序排序. 這個語法可以一步到位解決你所有的情況的計算
(還有499個字)

推噓1(1推 0噓 13→)留言14則,0人參與, 最新作者imaltar (..)時間15年前 (2010/06/25 21:46), 編輯資訊
0
0
0
內容預覽:
data survial;input date date10. response;. format date date10. ;. cards;. 09AUG07 1. 23AUG07 1. 06SEP07 2. 20SEP07 2. 05OCT07 1. 16OCT07 1. 30OCT07 2.
(還有1961個字)
首頁
上一頁
1
2
下一頁
尾頁