title: How can I do test wald in Python?
body: <p>I want to test a hypothesis that "intercept = 0, beta = 1" so I should do wald test and used module 'statsmodel.formula.api'.</p>
  
  <p>But I'm not sure which code is correct when doing wald test.</p>
  
  <pre><code>from statsmodels.datasets import longley
  import statsmodels.formula.api as smf
  data = longley.load_pandas().data
  
  hypothesis_0 = '(Intercept = 0, GNP = 0)'
  hypothesis_1 = '(GNP = 0)'
  hypothesis_2 = '(GNP = 1)'
  hypothesis_3 = '(Intercept = 0, GNP = 1)'
  results = smf.ols('TOTEMP ~ GNP', data).fit()
  wald_0 = results.wald_test(hypothesis_0)
  wald_1 = results.wald_test(hypothesis_1)
  wald_2 = results.wald_test(hypothesis_2)
  wald_3 = results.wald_test(hypothesis_3)
  
  print(wald_0)
  print(wald_1)
  print(wald_2)
  print(wald_3)
  
  results.summary()
  </code></pre>
  
  <p>I thought hypothesis_3 is right at first. </p>
  
  <p>But the result of hypothesis_1 is same with F-test of regression, which represent that the hypothesis 'intercept = 0 and beta = 0'.</p>
  
  <p>So, I thought that the module,'wald_test' set 'intercept = 0' by default.</p>
  
  <p>I'm not sure which one is correct.</p>
  
  <p>Could you please give me an answer which one is right?</p>