1

pandas.olsバージョン0.7.3の関数を使用しています。単純回帰とウィンドウ回帰を使用すると、調整済み$ R ^2$の値に一貫性がないようです。たとえば、600のエントリがある場合realizedDatapastData

model = pandas.ols(y = realizedData, x = pastData, intercept = 0, window = 600)

次の出力を生成します:-

-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <1> + <10> + <90000>

Number of Observations:         596
Number of Degrees of Freedom:   3

R-squared:         0.6914
Adj R-squared:     0.6904

Rmse:            699.4880

F-stat (3, 593):   664.3691, p-value:     0.0000

Degrees of Freedom: model 2, resid 593

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
             1     0.4171     0.0428       9.75     0.0000     0.3333     0.5010
            10     0.4362     0.0688       6.34     0.0000     0.3014     0.5709
         90000     0.0623     0.0319       1.95     0.0517    -0.0003     0.1249
---------------------------------End of Summary---------------------------------

使用している間

model = pandas.ols(y = realizedData, x = pastData, intercept = 0)

与える:-

-------------------------Summary of Regression Analysis-------------------------

Formula: Y ~ <1> + <10> + <90000>

Number of Observations:         596
Number of Degrees of Freedom:   3

R-squared:         0.6914
Adj R-squared:     0.3053

Rmse:            699.4880

F-stat (3, 593):     1.7909, p-value:     0.1477

Degrees of Freedom: model 2, resid 593

-----------------------Summary of Estimated Coefficients------------------------
      Variable       Coef    Std Err     t-stat    p-value    CI 2.5%   CI 97.5%
--------------------------------------------------------------------------------
             1     0.4171     0.0428       9.75     0.0000     0.3333     0.5010
            10     0.4362     0.0688       6.34     0.0000     0.3014     0.5709
         90000     0.0623     0.0319       1.95     0.0517    -0.0003     0.1249
---------------------------------End of Summary---------------------------------

調整された$R^ 2 $値を除いて、出力は同じであることに注意してください。

これはバグですか、それとも私は何か間違ったことをしていますか?

4

1 に答える 1

1

インターセプトの欠如に関係していると思います。GitHub で問題を報告していただけますか?

于 2012-09-08T23:09:44.640 に答える