title: Error in density.default.....need at least 2 points to select a bandwidth automatically
body: <p>I am using the <code>mice</code> package to obtain completed data. 
  I believe the problem is that I am not doing imputations for all the data, and so some of them have NAs.  (some variables with missing data are used simply to predict missingness in others so I don't want to impute those.</p>
  
  <p>I can duplicate the problem with this code:</p>
  
  <pre><code>require(mice)
  impute &lt;- mice(
      nhanes, 
      imputationMethod = c(
          "",        # age
          "pmm",     # bmi
          "pmm",  # hyp
          ""         # chl
      ),
      seed = 101)
  x11()
  densityplot(impute)
  
  Error in density.default(x = c(NA_real_, NA_real_, NA_real_, NA_real_,  : 
    need at least 2 points to select a bandwidth automatically
  </code></pre>
  
  <p>How can I get the densityplots ? If I replace the <code>""</code> with <code>"pmm"</code> for <code>chl</code> or just run <code>impute &lt;- mice(nhanes)</code> then it will work with this example, to produce this:
  <img src="https://i.stack.imgur.com/yTqbQ.png" alt="enter image description here"></p>
  
  <p>but I can't do that with my own data, so I'm looking for another way....just to get the 
  density plots for <code>bmi</code> and <code>hyp</code>, after running <code>mice</code> with my code above which does not impute values for <code>chl</code></p>
  
  <p><strong>Edit:</strong>
  I know I can use the methods in the answer to my <a href="https://stackoverflow.com/questions/12056989/density-plots-with-multiple-groups">earlier</a> question using <code>ggplot</code>, but in this case I really need to work with <code>densityplot</code></p>