sas系统和数据分析逐步回归分析(编辑修改稿)内容摘要:

Bounds on condition number: 1, 1 Step 2 Variable AGE Entered Rsquare = C(p) = DF Sum of Squares Mean Square F ProbF Regression 2 Error 28 Total 30 Parameter Standard Type II Variable Estimate Error Sum of Squares F ProbF INTERCEP AGE RUNTIME Bounds on condition number: , Step 3 Variable RUNPULSE Entered Rsquare = C(p) = DF Sum of Squares Mean Square F ProbF Regression 3 Error 27 Total 30 Parameter Standard Type II Variable Estimate Error Sum of Squares F ProbF INTERCEP AGE RUNPULSE RUNTIME Bounds on condition number: , Step 4 Variable MAXPULSE Entered Rsquare = C(p) = DF Sum of Squares Mean Square F ProbF Regression 4 Error 26 Total 30 Parameter Standard Type II Variable Estimate Error Sum of Squares F ProbF INTERCEP AGE MAXPULSE RUNPULSE RUNTIME Bounds on condition number: , All variables left in the model are significant at the level. No other variable met the significance level for entry into the model. Summary of Stepwise Procedure for Dependent Variable OXYGEN faf3e80a2379c5288629d4555eb92a18 商务数据分析 电子商务系列 上海财经大学经济信息管理系 IS/SHUFE Page 10 of 25 如果按 CP值选择最优子集,随 着进入回归模型中的自变量个数 P 从 2 增加 到 5 个(包括截距),相应 CP 值从大到小为 、 、 和 ,按照Mallows 提出的回归模型最优自变量个数的选择准则, CP= 是最接近自变量个数P=5 的模型。 CP 的计算公式见 式 (),当 P=5 时, CP=- (31- 25)=。 因此,用逐步回归方法及 CP 值确认的拟合回归模型为: oxygen= - + - - 条件指数( condition number)为最大特征值和每个特征值之比的平方根。 我们看到 , 当模型进入第四个自变量 maxpulse 时,最大的条件指数从较小 的 变成了较大 的,说明存在一定程度的共线性,根据前面例 的分析,我们诊断这个共线性方程可能为 runpulse- maxpulse=0。 在向前、向后或逐步回归的变量选择过程中,都 有一个判断是否可进入或剔除的显著水平,在程序中是分别由 model语句的选项 slentry=和 slstay=设定的,缺省的情况见表。 表 缺省的入选和剔除 显著水平 forward backward stepwize slentry slstay 下面我们提供全部可能回归的程序,并且以 R2 值 由 大到小 的 排序输出。 proc reg data= fitness。 model oxygen = age weight rstpulse maxpulse runpulse runtime /selection= rsquare b。 run。 在上述程序中, model语句的选项 selection= rsquare,表示请求 R2值最大法,选项 b 是表示要输出每种回归的回归系数。 程序运行后,得到 如 表 所示的结果。 表 用 R2排序全部可能的变量数的 逐步 回归分析结果 faf3e80a2379c5288629d4555eb92a18 商务数据分析 电子商务系列 上海财经大学经济信息管理系 IS/SHUFE Page 11 of 25 程序的输出包括所有只含一个变量的 6 种回归,含 2 个变量的 15 种回归„„ 总共有 63种不同形式的回归模型。 例如,含 2 个自变量按 R2 第二个大值选择回归模型为, R2 =,拟合的回归模型为 : oxygen= - - 若对每种变量个数,只要保留 R2 最大的两种情况,可在 model语句中加入选项 best=2,即提交以下的程序: proc reg data= fitness。 model oxygen = age weight rstpulse maxpulse runpulse runtime /selection= rsquare b best=2。 run。 这一程序提供较为紧凑的输出报表, 如 表 所示的结果。 表 只保留 R2最大两种情况的逐步 回归分析结果 N = 31 Regression Models for Dependent Variable: OXYGEN Parameter Number in Rsquare Estimates Model Intercept AGE WEIGHT RSTPULSE MAXPULSE RUNPULSE RUNTIME 1 . . . . . 1 . . . . . 1 . . . . . 1 . . . . . 1 . . . . . 1 . . . . . 2 . . . . 2 . . . . 2 . . . . „„ „„ „„ „„ 5 . 5 . 6 faf3e80a2379c5288629d4555eb92a18 商务数据分析 电子商务系列 上海财经大学经济信息管理系 IS/SHUFE Page 12 of 25 通过上面的逐步回归分析,我们已经得到回归模型的自变量个数确定时的最优子集 或次优子集,但问题是我们到底应该选择几个自变量的回归模型呢。 如 表 中的 3个自变量、4 个自变量、 5。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。