大哥,MATLAB做线性回归分析

y=a1*x1+a2*x2+a3*x3+常数,这是模型。
数据:y=35 43 55 47 43 57 26 27 28 29 22 29 19 11 14 23 20 22 13 8 3 27 26 5
x1=2 2 2 2 2 2 5 5 5 5 5 5 7 7 7 7 7 7 10 10 10 10 10 10
x2=0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 1 1
x3=0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75 0.25 0.50 0.75
用MATLAB求系数a1 a2 a3
问题补充:还有怎么对它进行回归分析呢,置信区间, R平方啊,F统计量值,与统计量F对应的概率P等等,衷心感谢你的回答,我提高悬赏 ,

自己看regress帮助文档。

[b,bint] = regress(y,X) returns a matrix bint of 95% confidence intervals for β.

[b,bint,r] = regress(y,X) returns a vector, r, of residuals.

[b,bint,r,rint] = regress(y,X) returns a matrix rint of intervals that can be used to diagnose outliers. If rint(i,:) does not contain zero, then the ith residual is larger than would be expected, at the 5% significance level. This suggests that the ith observation is an outlier.

[b,bint,r,rint,stats] = regress(y,X) returns a vector stats that contains, in the following order, the R2 statistic, the F statistic and a p value for the full model, and an estimate of the error variance.

[...] = regress(y,X,alpha) uses a 100(1 - alpha)% confidence level to compute bint, and a (100*alpha)% significance level to computerint. For example, alpha = 0.2 gives 80% confidence intervals.来自:求助得到的回答
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-01-28
a1=-1.3061
a2=13.6883
a3=46.6298
相似回答