哪位高手能不能给个具体的指教关于matlab统计工具箱里的regress怎么用

来源:百度知道 编辑:UC知道 时间:2024/05/29 04:01:47

[b,bint,r,rint,stats] = regress(y,X,alpha)
这是regress最完整的用法,其中y为要拟合的因变量
X为对应于你要求的系数的系数矩阵
alpha为显著水平
输出的b是你要求的系数组成的矩阵
bint是置信区间
r是用来诊断奇异点的
stats会返回四个变量
the R2 statistic,相关系数
the F statistic and its p-value,F检验及p值
and an estimate of the error variance.误差方差估计

[b bint r rint s]=regress(y,x,alpha);
%y=[....]'
%x=[ones(n,1) x1 x2 x3 .... xn];