teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

summary()の出力を追加

2018/07/05 02:17

投稿

ak_miyamoto
ak_miyamoto

スコア31

title CHANGED
File without changes
body CHANGED
@@ -47,4 +47,40 @@
47
47
  Kurtosis: 3.003 Cond. No. 702.
48
48
  ==============================================================================
49
49
  ```
50
- のようなよくある結果をプリントしたいのですが、どうしたらよいでしょうか。教えて下さると幸いです。
50
+ のようなよくある結果をプリントしたいのですが、どうしたらよいでしょうか。
51
+ なお
52
+ ```
53
+ results.summary()
54
+ ```
55
+ としても
56
+ ```
57
+ ---------------------------------------------------------------------------
58
+ TypeError Traceback (most recent call last)
59
+ <ipython-input-121-c942b82acb49> in <module>()
60
+ ----> 1 result.summary()
61
+
62
+ ~\Anaconda3\lib\site-packages\statsmodels\sandbox\regression\gmm.py in summary(self, yname, xname, title, alpha)
63
+ 325 top_right = [('R-squared:', ["%#8.3f" % self.rsquared]),
64
+ 326 ('Adj. R-squared:', ["%#8.3f" % self.rsquared_adj]),
65
+ --> 327 ('F-statistic:', ["%#8.4g" % self.fvalue] ),
66
+ 328 ('Prob (F-statistic):', ["%#6.3g" % self.f_pvalue]),
67
+ 329 #('Log-Likelihood:', None), #["%#6.4g" % self.llf]),
68
+
69
+ ~\Anaconda3\lib\site-packages\statsmodels\tools\decorators.py in __get__(self, obj, type)
70
+ 95 if _cachedval is None:
71
+ 96 # Call the "fget" function
72
+ ---> 97 _cachedval = self.fget(obj)
73
+ 98 # Set the attribute in obj
74
+ 99 # print("Setting %s in cache to %s" % (name, _cachedval))
75
+
76
+ ~\Anaconda3\lib\site-packages\statsmodels\sandbox\regression\gmm.py in fvalue(self)
77
+ 217 restriction = np.eye(k_vars)
78
+ 218 idx_noconstant = lrange(k_vars)
79
+ --> 219 del idx_noconstant[self.model.data.const_idx]
80
+ 220 fval = self.f_test(restriction[idx_noconstant]).fvalue # without constant
81
+ 221 return fval
82
+
83
+ TypeError: list indices must be integers or slices, not NoneType
84
+ ```
85
+ となってしまいます。ソースを読んでもいまいちよくわかりません。
86
+ 教えて下さると幸いです。