SAS phreg。如何划分数据集进行分离分析?

时间:2016-03-11 10:46:37

标签: sas

SAS数据集包括来自两个中心(= 1和2)的数据。如何分别为每个中心制作phreg?

proc phreg data = a;
INPUT center time censor gender;
class gender;
model time*censor(0) = gender; 
run;

1 个答案:

答案 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

再做一次