title: How to perform RMSE with missing values?
body: <p>I have a huge dataset with 679 rows and 16 columns with 30 % of missing values. So I decided to  impute this missing values with the function impute.knn from the package impute and I got a dataset with 679 rows and 16 columns but without the missing values.</p>
  
  <p>But now I want to check the accuracy using the RMSE and I tried 2 options:</p>
  
  <ol>
  <li>load the package <code>hydroGOF</code> and apply the <code>rmse</code> function </li>
  <li><code>sqrt(mean (obs-sim)^2), na.rm=TRUE)</code></li>
  </ol>
  
  <p>In two situations I have the error: <code>errors in sim .obs: non numeric argument to binary operator.</code> </p>
  
  <p>This is happening because the original data set contains an <code>NA</code> value (some values are missing).</p>
  
  <p>How can I calculate the RMSE if I remove the missing values? Then <code>obs</code> and <code>sim</code> will have different sizes. </p>