作者查詢 / anniecs

總覽項目: 發文 | 留言 | 暱稱
作者 anniecs 在 PTT [ Statistics ] 看板的留言(推文), 共90則
限定看板:Statistics
[程式] SAS多對多合併求救
[ Statistics ]23 留言, 推噓總分: +2
作者: ip1020 - 發表於 2017/02/19 20:34(7年前)
1Fanniecs: proc sql; create table new as select x.in_date, x.out02/20 00:51
2Fanniecs: _date, y.date from data1 as y left join data2 as x wh02/20 00:51
3Fanniecs: ere x.in_date<=y.date<=x.out_date; quit;02/20 00:51
8Fanniecs: http://imgur.com/a/DGhXV02/20 16:32
9Fanniecs: 那把seq跟where的東西都放在on裡面,我test的結果是對的02/20 16:33
10Fanniecs: 你試試看唷~02/20 16:33
19Fanniecs: 請check住院期間是否有overlap,程式區間是左右都包,如02/22 14:45
20Fanniecs: 果住院區間是1/1-2/1與2/1-3/1,那2/1這天就會出現在兩02/22 14:45
21Fanniecs: 住院期,資料就會重覆。02/22 14:45
[程式] SAS 資料分組運算
[ Statistics ]15 留言, 推噓總分: +1
作者: blackhores - 發表於 2017/02/17 18:31(7年前)
1Fanniecs: proc sql; create table new as02/17 23:15
2Fanniecs: select SYMBOL,'A' as ABCD, CP, date,sum(A*delta/num)02/17 23:16
3Fanniecs: from old group by SYMBOL, ABCD, CP, date02/17 23:16
4Fanniecs: union02/17 23:17
5Fanniecs: select SYMBOL,'B' as ABCD, CP, date, sum(B*delta/num)02/17 23:17
6Fanniecs: from test group by SYMBOL, ABCD, CP, date02/17 23:17
7Fanniecs: union02/17 23:18
8Fanniecs: select SYMBOL,'C' as ABCD, CP, date, sum(C*delta/num)02/17 23:18
9Fanniecs: from old group by SYMBOL, ABCD, CP, date02/17 23:19
10Fanniecs: union02/17 23:19
11Fanniecs: select SYMBOL,'D' as ABCD, CP, date, sum(D*delta/num)02/17 23:19
12Fanniecs: from old group by SYMBOL, ABCD, CP, date; quit;02/17 23:20
[問題] 關於連續型依變數(統計預測模型)
[ Statistics ]2 留言, 推噓總分: +2
作者: andy4231 - 發表於 2015/09/13 11:09(8年前)
1Fanniecs: 如果可以把連續的y分類(合理定義下),模型選擇就會更多09/15 01:42
[程式] SAS 資料處理
[ Statistics ]3 留言, 推噓總分: +2
作者: titanman - 發表於 2015/09/06 11:24(8年前)
1Fanniecs: 可以兩個變數。merge搭配by 公司名 時間點;09/06 18:21
2Fanniecs: proc sql內可用inner join 搭配on x.公司名=y.公司名 and09/06 18:24
3Fanniecs: x.時間點=y.時間點09/06 18:24
[程式] SAS code 取代功能
[ Statistics ]4 留言, 推噓總分: +3
作者: wilson3260 - 發表於 2015/09/03 00:51(8年前)
4Fanniecs: 這應該是健保資料庫,R01…R25, try calls symput09/05 12:58
[問題] Propensity score match
[ Statistics ]5 留言, 推噓總分: +3
作者: chiehfu - 發表於 2015/08/08 19:29(8年前)
3Fanniecs: 1. PS是各變數的綜合,配對後無法保證所有的變數都balanc08/09 01:41
4Fanniecs: e。 2. 若除了PS外還有其它要一樣的變數,那配對時除了08/09 01:41
5Fanniecs: 放PS之外,還要加放年齡性別等。08/09 01:41
[程式] SAS 用藥日期重複計算
[ Statistics ]10 留言, 推噓總分: +3
作者: shga - 發表於 2015/07/15 14:16(8年前)
1Fanniecs: 純粹路過提醒,門診的給藥天數會高估,以當次看診開的所07/16 01:52
2Fanniecs: 有藥中最多天數當做給藥天數。可能要留意這部份~07/16 01:52
4Fanniecs: 原po的想法基本上可行,我也這麼處理過,但如同樓上講的07/16 14:13
5Fanniecs: ,欄位太多,跑起來很慢。但我覺得更重要的是探討幾種可07/16 14:13
6Fanniecs: 能性:1. 想看的藥常與慢性藥一起給,給藥天數就是慢性07/16 14:13
7Fanniecs: 藥而非探討的藥。2. 住院資料就更高估了,無法以住院天07/16 14:13
8Fanniecs: 數當吃藥起迄日。3. 病人會在藥吃完前先回診拿藥銜接。4.07/16 14:13
9Fanniecs: 同一成份的藥10mg開10天跟5mg開20天,總劑量不變。是否07/16 14:13
10Fanniecs: 用DDD取代開藥天數。07/16 14:13
[程式] Sas寫入空間不足??
[ Statistics ]11 留言, 推噓總分: +1
作者: weareyoung - 發表於 2015/07/08 10:50(9年前)
4Fanniecs: 有一個檔案叫zt什麼的,可以改暫存檔位置。07/08 17:09
[程式] SAS找出同一ID,某欄位符合特定條件的row
[ Statistics ]13 留言, 推噓總分: +2
作者: faceoflove56 - 發表於 2015/05/01 16:54(9年前)
1Fanniecs: proc sql;05/01 18:23
2Fanniecs: create table new_data as05/01 18:23
3Fanniecs: select name, role05/01 18:23
4Fanniecs: from old_data05/01 18:23
5Fanniecs: where name in (select name from old_data group by nam05/01 18:23
6Fanniecs: e having count(distinct role)>1);05/01 18:23
7Fanniecs: quit;05/01 18:23
8Fanniecs: 怎樣散成這樣><05/01 18:23
Re: [程式] sas 如何用sql inner join??
[ Statistics ]4 留言, 推噓總分: +1
作者: tew - 發表於 2014/12/06 18:56(9年前)
1Fanniecs: 根據原po的data step指令,他要的應該是on x.var2=y.var212/06 21:04
2Fanniecs: and x.var3=y.var312/06 21:04