|
|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
- [b,bint,r,rint,stats] = regress(y,X)
3 B6 I9 N( {" o9 S% B T 8 Q! x' Z# U3 e$ w7 ?1 m6 r- o
这个是regress的使用说明,用来进行多元线性回归。
- L& P; R6 E5 z. R, A第一个问题:regress的第三个参数为置信水平,可填可不填,但是不管我填写与否,都会有一个warning:R-square and the F statistic are not well-defined unless X has a column of ones.
! X& r6 @' N1 t, cType "help regress" for more information.9 p: M+ c# o# ^+ d2 E/ a
& T6 e" {9 b7 ^1 X+ x. K" Q+ f! E# P第二个问题:r是预测值和真实值的差,r'*r应该是残差平方和吗?它能够用来评价回归模型的好坏吗?: k) F; r. w( L6 w! K6 f# |
% V$ d# A* N2 ^2 U) J3 M! C第三个问题:stats是一个数组,The vector stats contains the R2 statistic along with the F and p values for the regression
* h+ t$ K7 Q/ T+ `" a( `2 B 很多网上的使用说明,包括matlab的help都只提到了stats数组的3个成员,但是我使用regress函数后stats有4个成员,请问另外一个是代表什么问题
3 }) E( L6 t. P) J' w% k0 Q3 e. N( [+ D& y
|
|