title: Passing hypothesis in wald.test in R
body: <p>Please forgive as i am new to this forum. The study requires to check the sum of coefficients=0. The test can be conducted using eviews like c(2)+c(3)+c(4)=0, where 2 is the coefficient of 2nd term and hence forth. The code for the same using R is</p>
  
  <pre><code>    require(Hmisc)#this package is used to generate lags
      require(aod)#this package is used to conduct wald test
      output&lt;-lm(formula = s_dep ~ m_dep + Lag(m_dep,-1) + Lag(m_dep,-2) + s_rtn, data = qs_eq_comm)
      wald.test(b=coef(object=output),Sigma=vcov(object=output), Terms=2:4, H0=2+3+4)
  #H0=2+3+4 checks if the sum is zero
  </code></pre>
  
  <p>This gives error : Error in wald.test(b = coef(object = output), Sigma = vcov(object = output),  :  Vectors of tested coefficients and of null hypothesis have different lengths. As per the aod package the documentation specifies the format as </p>
  
  <pre><code>wald.test(Sigma, b, Terms = NULL, L = NULL, H0 = NULL,df = NULL, verbose = FALSE)
  </code></pre>
  
  <p>Please help to conduct this test.</p>