微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在SAS Student中使用PROC REG的结果

如何解决如何在SAS Student中使用PROC REG的结果

我正在测试Student版本的SAS REG程序。我设置了下表:

data work.house;
input houseSize lotSize bedrooms granite bathroom sellingPrice;
cards;
3529 9191  6 0 0 205000
3247 10061 5 1 1 224900
4032 10150 5 0 1 197900
2397 14156 4 1 0 189900
2200 9600  4 0 1 195000
3536 19994 6 1 1 325000
2983 9365  5 0 1 230000
;
run;

然后我对各种变量进行了回归分析,如下所示:

proc reg data=work.HOUSE;
    model sellingPrice = houseSize lotSize bedrooms granite bathroom;
run;

SAS Student以组织良好且完整的视觉形式(包括许多图形)显示结果。

但是,我需要使用估计的参数来预测其他输入。

有什么方法可以访问这些参数?

或者是否可以将结果(特别是 Parameter Estimates 表)保存到SAS数据集中?

解决方法

使用过程选项OUTEST=保存参数估计值。 使用OUTPUT语句保存带有预测值和残差值的原始数据。

示例:

* output data sets highlighted with ^^^^;

proc reg noprint data=work.HOUSE outest=parameters;
*                                       ^^^^^^^^^^ ;
    model sellingPrice = houseSize lotSize bedrooms granite bathroom;
    output out=predicted p=fitprice r=fitresidual;
*              ^^^^^^^^^;
run;
quit;

参数

enter image description here

预测

enter image description here

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。