title: how to predict new cases using the neuralnet package
body: <p>Using RGUI. I have a dataset called Data. The response variable that I'm interested in is contained in the first column of <code>Data</code>. </p>
  
  <p>I have training sets of <code>Data</code> called <code>DataTrain</code> and <code>DataTest</code>.</p>
  
  <p>With <code>DataTrain</code> I trained a neural network model (called <code>DataNN</code>) using the package and function <code>neuralnet</code>.  </p>
  
  <pre><code>&gt; DataNN = neuralnet(DataTrain[,1] ~ DataTrain[,2] + DataTrain[,3], hidden = 1,
      data = DataTrain) 
  </code></pre>
  
  <p>Does anyone know how to create a prediction on this model using the test set (<code>DataTest</code>)?</p>
  
  <p>Normally (for other models) I would use <code>predict()</code> for this. E.g.</p>
  
  <pre><code>&gt; DataPred = predict(DataNN, DataTest)
  </code></pre>
  
  <p>But when doing this for <code>neuralnet</code> I get:</p>
  
  <pre><code>&gt; DataPred = predict(DataNN, DataTest)
  
  Error in UseMethod("predict") : 
  no applicable method for 'predict' applied to an object of class "nn"  
  </code></pre>
  
  <p>Obviously I can't run <code>predict()</code> on this model. Does anyone know of any alternatives?</p>
  
  <p>I've checked the help for <code>neuralnet</code> and I found a method called <code>prediction</code> in the page 12 of the <a href="http://cran.r-project.org/web/packages/neuralnet/neuralnet.pdf" rel="noreferrer">documentation</a>. I don't think it's what I want at all though, or at least I don't know how to apply it to my <code>Data</code>.</p>
  
  <p>Any help would be appreciated (if there is any solution to this at all).</p>