2016-05-09 6 views
0

単純なOLS回帰出力のタイトルを指定する方法があるのだろうかと思います。私は次のような回帰分析結果を得ており、そのうちのかなりのものをやっていきます。あなたは、変数を置換する方法を確認するには、printコマンドを調べることができ、もちろんこれはPython 3:pandas:単純なOLS回帰出力のタイトルを指定する方法はありますか?

MODEL 1: OLS Regression Results ## This is a preferred title 

Dep. Variable: billsum_support  R-squared: 0.019 
Model: OLS  Adj. R-squared:  0.017 
Method:  Least Squares F-statistic: 15.63 
Date: Mon, 09 May 2016 Prob (F-statistic):  5.15e-23 
Time: 04:32:43 Log-Likelihood:  -6110.2 
No. Observations: 6597 AIC: 1.224e+04 
Df Residuals: 6588 BIC: 1.230e+04 
Df Model: 8  
Covariance Type: nonrobust  
    coef std err  t P>|t| [95.0% Conf. Int.] 
const 0.9745 0.032 30.570 0.000 0.912 1.037 
years_exp 3.882e-05 0.001 0.057 0.955 -0.001 0.001 
leg_totalbills 0.0017 0.001 2.538 0.011 0.000 0.003 
log_diff_rgdp 0.4085 0.222 1.838 0.066 -0.027 0.844 
unemployment -0.0099  0.004 -2.785 0.005 -0.017 -0.003 
expendituresfor  6.519e-06 8.07e-07 8.082 0.000 4.94e-06 8.1e-06 
direct_expenditures  1.334e-05 1.56e-06 8.533 0.000 1.03e-05 1.64e-05 
indirect_expenditures -6.823e-06 9.27e-07 -7.358 0.000 -8.64e-06 -5e-06 
Republican 0.0806 0.017 4.839 0.000 0.048 0.113 
sen  0.0441 0.024 1.847 0.065 -0.003 0.091 
Omnibus: 2344.287 Durbin-Watson: 1.717 
Prob(Omnibus): 0.000 Jarque-Bera (JB): 17321.494 
Skew: 1.507 Prob(JB): 0.00 
Kurtosis: 10.344 Cond. No. 1.55e+15 

答えて

1

印刷(「OLS回帰は、結果モデル1:」)私は、次のようにそれが何かを見ていることを希望します文字列の任意の部分...だから何かをループしている場合は、文字列を変更するためにループカウンタを使用することができます..

+0

スーパー!私はフォーマットもはるかに良いのが好きです!ありがとうございました。 –

関連する問題