procsgpanel-reg仅适用于组的一种模式



我对SAS 9.2有一些计算问题。

这是我的代码:

data test;
set sashelp.cars;
WHERE Make in ('Acura', 'Audi');
run
proc sgpanel data=test;
panelby origin;
reg y=Weight x=Length/group=Make;
run;

回归选项应用于变量Make的2种模态。有可能只复制其中一个吗?例如,只在Make‘Audi上?

非常感谢。

只需使用sgplot绘制两个单独的图。

/* regression plot for the one you need the regression */
proc sgplot data=sashelp.cars;
WHERE Make eq 'Audi';
reg y=Weight x=Length/group=Make;
run;
/* scatter plot for the one you need no regression */
proc sgplot data=sashelp.cars;
WHERE Make eq 'Acura';
scatter y=Weight x=Length/group=Make;
run;

此外,我也没有在图形程序中集成选择。

相关内容

最新更新