質問編集履歴

1

summary()の出力を追加

2018/07/05 02:17

投稿

ak_miyamoto
ak_miyamoto

スコア31

test CHANGED
File without changes
test CHANGED
@@ -96,4 +96,76 @@
96
96
 
97
97
  ```
98
98
 
99
- のようなよくある結果をプリントしたいのですが、どうしたらよいでしょうか。教えて下さると幸いです。
99
+ のようなよくある結果をプリントしたいのですが、どうしたらよいでしょうか。
100
+
101
+ なお
102
+
103
+ ```
104
+
105
+ results.summary()
106
+
107
+ ```
108
+
109
+ としても
110
+
111
+ ```
112
+
113
+ ---------------------------------------------------------------------------
114
+
115
+ TypeError Traceback (most recent call last)
116
+
117
+ <ipython-input-121-c942b82acb49> in <module>()
118
+
119
+ ----> 1 result.summary()
120
+
121
+
122
+
123
+ ~\Anaconda3\lib\site-packages\statsmodels\sandbox\regression\gmm.py in summary(self, yname, xname, title, alpha)
124
+
125
+ 325 top_right = [('R-squared:', ["%#8.3f" % self.rsquared]),
126
+
127
+ 326 ('Adj. R-squared:', ["%#8.3f" % self.rsquared_adj]),
128
+
129
+ --> 327 ('F-statistic:', ["%#8.4g" % self.fvalue] ),
130
+
131
+ 328 ('Prob (F-statistic):', ["%#6.3g" % self.f_pvalue]),
132
+
133
+ 329 #('Log-Likelihood:', None), #["%#6.4g" % self.llf]),
134
+
135
+
136
+
137
+ ~\Anaconda3\lib\site-packages\statsmodels\tools\decorators.py in __get__(self, obj, type)
138
+
139
+ 95 if _cachedval is None:
140
+
141
+ 96 # Call the "fget" function
142
+
143
+ ---> 97 _cachedval = self.fget(obj)
144
+
145
+ 98 # Set the attribute in obj
146
+
147
+ 99 # print("Setting %s in cache to %s" % (name, _cachedval))
148
+
149
+
150
+
151
+ ~\Anaconda3\lib\site-packages\statsmodels\sandbox\regression\gmm.py in fvalue(self)
152
+
153
+ 217 restriction = np.eye(k_vars)
154
+
155
+ 218 idx_noconstant = lrange(k_vars)
156
+
157
+ --> 219 del idx_noconstant[self.model.data.const_idx]
158
+
159
+ 220 fval = self.f_test(restriction[idx_noconstant]).fvalue # without constant
160
+
161
+ 221 return fval
162
+
163
+
164
+
165
+ TypeError: list indices must be integers or slices, not NoneType
166
+
167
+ ```
168
+
169
+ となってしまいます。ソースを読んでもいまいちよくわかりません。
170
+
171
+ 教えて下さると幸いです。