问题描述
我估计以下模型:
proc surveyreg data = data;
cluster id;
model y = x1 x2 x3 x4;
run;
quit;
我想共同检验以下两个假设:x1 = x3,x2 = x4。
我知道如何在其他回归过程中做到这一点。例如,在proc面板中,我只是做:“ test x1 = x3,x2 = x4;”它给了我各自的Wald Test统计量。但是,我在proc surveyreg中无法做到这一点(通过使用对比语句?)。
感谢您的帮助!
解决方法
您可能希望查看CONTRAST语句的文档。
proc contents data=sashelp.fish varnum;
proc print data=sashelp.fish;
run;
proc glm /*surveyreg*/ data=sashelp.fish;
model width = Weight Length1 Length2 Length3 Height;
contrast 'length1=length2,length3=height' length1 1 length2 -1,length3 1 height -1 / e;
run;
proc reg data=sashelp.fish plots=none;
model width = Weight Length1 Length2 Length3 Height;
TEST1: Test length1=length2,length3=height;
run; quit;