title: How to deal with Error: 0 (non-NA) cases plm package?
body: <p>I know this has been asked, and I've looked at at least 10 threads on this topic, but I still can't understand it. I'm using the plm package to estimate a random effects model on some panel data. I have a model that I have specified, but when I insert an additional variable that does not contain any NA's, I get the following error message.</p>
  <pre><code>Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : 
    0 (non-NA) cases
  </code></pre>
  <p>I have pared it down as much as possible to the following:</p>
  <pre><code>plm(dependent ~ varA + varB + varC + varD, data=mydata,
      model=&quot;random&quot;, index=c(&quot;Name&quot;, &quot;Month&quot;), na.action=na.exclude)
  </code></pre>
  <p>Without <code>varA</code> the model works fine. In place of <code>VarA</code>, I can insert other variables that I have at my disposal, and some will work while others will not.</p>
  <p>My data can be obtained <a href="https://www.dropbox.com/s/9s1z5rj7uhq4qi0/QuestionData.xlsx?dl=0" rel="nofollow noreferrer">here</a>.</p>
  <p>I have tried using <code>na.omit(mydata)</code>, which works sometimes but not reliably.</p>
  <p>Any insight would be appreciated.</p>