[問題] 有關sas配對問題
目前所做研究是希望進行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
09/01 01:19, 1F
→
09/01 01:19, , 2F
09/01 01:19, 2F