title: felm function: Negative eigenvalues in multiway clustered variance matrix
body: <p>I'm running following regression using felm() function in R and receiving following warning messages:</p>
  
  <pre><code>malmquist.felm &lt;- felm(malmquist~ IT + logTA + npl | firm + year | 0 | firm + year , data=Data)
  
  Warning message:
  In newols(mm, nostats = nostats[1], exactDOF = exactDOF, onlyse = onlyse,  :
    Negative eigenvalues set to zero in multiway clustered variance matrix. See felm(...,psdef=FALSE)
  
  &gt; summary(malmquist.felm)
  
  Call:
     felm(formula = malmquist ~ IT + logTA + npl | firm + year | 0 | firm + year, data = Data) 
  
  Residuals:
        Min        1Q    Median        3Q       Max 
  -0.212863 -0.043140 -0.002299  0.040482  0.302387 
  
  Coefficients:
                      Estimate Cluster s.e. t value Pr(&gt;|t|)    
  IT                -9.373e-03    8.749e-03  -1.071    0.315    
  logTA              8.828e-02    2.955e-03  29.871 1.71e-09 ***     
  npl                2.435e-03    3.410e-03   0.714    0.496    
  ---
  Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
  
  Residual standard error: 0.08268 on 317 degrees of freedom
    (98 observations deleted due to missingness)
  Multiple R-squared(full model): 0.2651   Adjusted R-squared: 0.1352 
  Multiple R-squared(proj model): 0.08175   Adjusted R-squared: -0.08046 
  F-statistic(full model, *iid*):2.042 on 56 and 317 DF, p-value: 6.886e-05 
  F-statistic(proj model): 0.7007 on 6 and 8 DF, p-value: 0.6582 
  
  
  Warning message:
  In chol.default(mat, pivot = TRUE, tol = tol) :
    the matrix is either rank-deficient or indefinite
  </code></pre>
  
  <p>Does anyone know how to solve this problem or can I just ignore the warning messages?</p>