SAS数据集包括来自两个中心(= 1和2)的数据。如何分别为每个中心制作phreg?
proc phreg data = a;
INPUT center time censor gender;
class gender;
model time*censor(0) = gender;
run;
答案 0 :(得分:1)
proc sort data = a;
by center;
run;
proc phreg data = a;
input time censor gender;
class gender;
model time*censor(0) = gender;
by center;
run;
是一种方式。另一个是
proc phreg data = a;
input time censor gender;
class gender;
model time*censor(0) = gender;
where center = 1;
run;
然后再用center = 2
再做一次