title: "system is computationally singular" error when using `gmm` (GMM Estimation)
body: <p>Trying to use the GMM package in R to estimate the parameters (a-f) of a linear model:</p>
  
  <pre><code>LEV1 = a*Macro + b*Firm + c*Sector + d*qtr + e*fqtr + f*tax
  </code></pre>
  
  <p>Macro, Firm and Sector are matrices with n number of rows. qtr, fqtr and tax are vectors  with n members.</p>
  
  <p>I have one large data frame called unconstrd that has all of the data.  First, I break that data into separate matrices:</p>
  
  <pre><code>v_LEV1 &lt;- as.matrix(unconstrd$LEV1)
  Macro &lt;- as.matrix(cbind(unconstrd$Agg_Corp_Prof,unconstrd$R1000_TR, unconstrd$CP_Spread))
  Firm &lt;- as.matrix(cbind(unconstrd$ppe_ratio, unconstrd$op_inc_ratio_avg, unconstrd$selling_exp_avg,
                    unconstrd$tax_avg, unconstrd$Mark_to_Bk, unconstrd$mc_ratio))
  Sector &lt;- as.matrix(cbind(unconstrd$Sect_Flag03,
                    unconstrd$Sect_Flag04, unconstrd$Sect_Flag05, unconstrd$Sect_Flag06,
                    unconstrd$Sect_Flag07, unconstrd$Sect_Flag08, unconstrd$Sect_Flag12,
                    unconstrd$Sect_Flag13, unconstrd$Sect_Flag14, unconstrd$Sect_Flag15,
                    unconstrd$Sect_Flag17))
  v_qtr &lt;- as.matrix(unconstrd$qtr)
  v_fqtr &lt;- as.matrix(unconstrd$fqtr)
  v_tax &lt;- as.matrix(unconstrd$tax_dummy)
  </code></pre>
  
  <p>Then, I bind the data together for the x variable called by gmm:</p>
  
  <pre><code>h=cbind(Macro,Firm,Sector,v_qtr, v_fqtr, v_tax)
  </code></pre>
  
  <p>Then, I invoke gmm:</p>
  
  <pre><code>gmm1 &lt;- gmm(v_LEV1 ~ Macro + Firm + Sector + v_qtr + v_fqtr + v_tax, x=h)
  </code></pre>
  
  <p>I get the message:</p>
  
  <pre><code>Error in solve.default(crossprod(hm, xm), crossprod(hm, ym)) : 
    system is computationally singular: reciprocal condition number = 1.10214e-18
  </code></pre>
  
  <p>I apologize in advance and admit that I'm a neophyte at R and I've never used GMM before.  The GMM function is so general, I've looked at the examples available on the web but nothing seems specific enough to help my situation.</p>