解释Matlab Fitln

时间:2015-04-19 15:17:37

标签: matlab linear-regression

我有一系列200 x / y的数据点,并使用matlab生成模型。我试图确定fitln生成的多项式函数的顺序。我尝试从6开始,希望一些高阶系数不重要,但得到以下结果:

Linear regression model:
    y ~ 1 + x1 + x1^2 + x1^3 + x1^4 + x1^5 + x1^6

Estimated Coefficients:
                    Estimate          SE         tStat       pValue  
                   ___________    __________    _______    __________

    (Intercept)              0             0        NaN           NaN
    x1                   11897         462.8     25.706    2.1825e-64
    x1^2               -442.92        26.689    -16.596     4.438e-39
    x1^3                 7.323       0.55975     13.083    1.8862e-28
    x1^4             -0.059949     0.0053902    -11.122     1.516e-22
    x1^5            0.00023784    2.4198e-05     9.8286    9.3122e-19
    x1^6           -3.6511e-07    4.1034e-08    -8.8978    4.0169e-16


Number of observations: 201, Error degrees of freedom: 195
Root Mean Squared Error: 1.36e+04
R-squared: 0.519,  Adjusted R-Squared 0.506
F-statistic vs. constant model: 42, p-value = 3.1e-29

我得到以下5阶多项式:

Linear regression model:
    y ~ 1 + x1 + x1^2 + x1^3 + x1^4

Estimated Coefficients:
                    Estimate          SE         tStat       pValue  
                   ___________    __________    _______    __________

    (Intercept)     1.0011e+05        19.058     5252.9             0
    x1                  -19.02        1.3004    -14.626    3.0955e-33
    x1^2               0.27502      0.026087     10.542    7.1559e-21
    x1^3            -0.0029912    0.00019381    -15.434    1.0751e-35
    x1^4           -2.1979e-06    4.7601e-07    -4.6174    7.0203e-06


Number of observations: 201, Error degrees of freedom: 196
Root Mean Squared Error: 52.4
R-squared: 1,  Adjusted R-Squared 1
F-statistic vs. constant model: 5.8e+05, p-value = 0

现在,我注意到在所有情况下p值都非常低(我认为好),R平方大于0.5(我认为这也很好)。

所以,我不确定该如何处理这些数据。我知道我应该针对低阶多项式,但我怎么能证明这一点?

0 个答案:

没有答案