其实从模型效果看,p4和p6几乎无用,可以取消。看看结果
Nonlinear regression model:
y ~ p1 + p2*x1 + p3*x1^2 + p4*x2 + p5*x2^2 + p6*x2^3
Estimated Coefficients:
Estimate SE tStat pValue
___________ __________ _______ __________
p1 21.414 1.0366 20.658 6.9326e-12
p2 -0.4722 0.12656 -3.731 0.0022358
p3 0.011955 0.0033312 3.5889 0.002963
p4 0.0049143 0.0036869 1.3329 0.20385
p5 -0.02989 0.00033676 -88.758 1.159e-20
p6 -9.6989e-06 9.0728e-06 -1.069 0.30315
Number of observations: 20, Error degrees of freedom: 14
Root Mean Squared Error: 0.0944
R-Squared: 1,Adjusted R-Squared 1
F-statistic vs. constant model: 1.49e+04, p-value = 1.48e-25
Nonlinear regression model:
y ~ p1 + p2*x1 + p3*x1^2 + p4*x2^2
Estimated Coefficients:
Estimate SE tStat pValue
_________ __________ _______ __________
p1 21.431 1.0342 20.723 5.5303e-13
p2 -0.47424 0.12626 -3.7561 0.0017256
p3 0.01 0.0033233 3.6123 0.0023379
p4 -0.029883 0.00033594 -88.952 5.4071e-23
Number of observations: 20, Error degrees of freedom: 16
Root Mean Squared Error: 0.0941
R-Squared: 1,Adjusted R-Squared 1
F-statistic vs. constant model: 2.49e+04, p-value = 1.47e-29
简化模型后,MSE反而更小了,F统计量更大了,对应的p值更小了。
如果觉得《matlab用于多元曲面拟合 多元拟合函数 三维拟合曲线(曲面)》对你有帮助,请点赞、收藏,并留下你的观点哦!