这取决于包不包括两变量的交互作用了。这种情况下建议用包含class语句的logistic过程或genmod过程做logistic回归,包含class语句的logistic过程或genmod过程会自动帮你创建哑变量。不需要在data步中自己创建。
proc genmod data=test;
class x y;
model dep_var=x y /dist=binomial;
run;
或者
proc genmod data=test;
class x y;
model dep_var=x y x*y/dist=binomial;
run;
引入多少个哑变量看参数估计的那部分输出结果就知道了!
温馨提示:答案为网友推荐,仅供参考