title: Using predict for linear model with NA values in R
body: <p>I have a dataset of ~32,000, for which I have created a linear model. ~12,000 observations were deleted due to missingness.</p>
  
  <p>I am trying to use the predict function to backtest the expected value for each of my 32,000 data points, but [as expected], this gives the error 'replacement has 20000 rows, data has 32000'.</p>
  
  <ol>
  <li>Is there any way I can use that model made on the 20,000 rows to predict that of the 32,000? I am happy to have 'zero' for observations that don't have results for every column used in the model.</li>
  <li>If not, how can I at least subset the 32,000 dataset correctly such that it only includes the 20,000 whole observations? If my model was lm(a ~ x+y+Z, data=data), for example, how would I filter data to only include observations with full data in x, y and z?</li>
  </ol>