[問題] 有關sas配對問題

看板Statistics作者 (milkbottle)時間15年前 (2009/09/01 00:51), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
目前所做研究是希望進行case組與control組配對~ 配對條件為: 年齡加減五歲以及居住地相同 上網找尋資料後~ 發現了這個語法~ /*定義區間值*/ data control2; set control; age_h=age+1; /*可接受的年齡上限*/ age_l=age-1; /*可接受的年齡下限*/ run; Proc sql; create table match as select one.id as study_id, two.id as control_id, one.age as study_age, two.age as control_age, one.bmi as study_bmi, two.bmi as control_bmi, one.rand_num as rand_num from study one, control2 two where ((one.age between two.age_l and two.age_h) /*區間配對*/ and one.bmi=two.bmi); 可是看不懂=>one和two的意思~ 為什麼需要寫one和two?? 還是說有其他寫法~希望會的大大教我一下~ 謝謝大家~ (不知道這個是否可以在這問~如不行會自d) -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.135.32

09/01 01:19, , 1F
是從這來的 from study (as) one, control2 (as) two
09/01 01:19, 1F

09/01 01:19, , 2F
表示 study.ID ,control2.ID
09/01 01:19, 2F
文章代碼(AID): #1Ac_-2uK (Statistics)