多元线性回归问题,matlabx1=[100 101.9 108.2 104.01 102.6 103.6];x2=[174 162.6 233.8 257 322.4 373.1];y=[88.92 83.7 91.13 127.24 141.11 150.37];x=[x1' x2'];rstool(x,y,'purequadratic')X=[ones(6,1) x1'x2'(x1.^2) (x2.^2)];[b,bint,r,rint,stats]=reg
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/16 05:45:35
多元线性回归问题,matlabx1=[100 101.9 108.2 104.01 102.6 103.6];x2=[174 162.6 233.8 257 322.4 373.1];y=[88.92 83.7 91.13 127.24 141.11 150.37];x=[x1' x2'];rstool(x,y,'purequadratic')X=[ones(6,1) x1'x2'(x1.^2) (x2.^2)];[b,bint,r,rint,stats]=reg
多元线性回归问题,matlab
x1=[100 101.9 108.2 104.01 102.6 103.6];
x2=[174 162.6 233.8 257 322.4 373.1];
y=[88.92 83.7 91.13 127.24 141.11 150.37];
x=[x1' x2'];
rstool(x,y,'purequadratic')
X=[ones(6,1) x1'x2'(x1.^2) (x2.^2)];
[b,bint,r,rint,stats]=regress(y,X);
b,stats
多元线性回归问题,matlabx1=[100 101.9 108.2 104.01 102.6 103.6];x2=[174 162.6 233.8 257 322.4 373.1];y=[88.92 83.7 91.13 127.24 141.11 150.37];x=[x1' x2'];rstool(x,y,'purequadratic')X=[ones(6,1) x1'x2'(x1.^2) (x2.^2)];[b,bint,r,rint,stats]=reg
这下通了,都是小问题:
x1=[100 101.9 108.2 104.01 102.6 103.6];
x2=[174 162.6 233.8 257 322.4 373.1];
y=[88.92 83.7 91.13 127.24 141.11 150.37];
x=[x1' x2'];
rstool(x,y,'purequadratic')
format short g
X=[ones(6,1) x1' x2' (x1.^2)' (x2.^2)']
[b,bint,r,rint,stats]=regress(y',X)
b,stats
结果:
b =
-8019.3
156.2
0.93544
-0.76405
-0.0011674
stats =
0.99524 52.239 0.10336 20.494