title: plot nonlinear regression conf intervals in R
body: <p>Please help.
  I have managed to fit a fairly decent nonlinear regression curve to my data using:</p>
  
  <pre><code>model2 &lt;- nls(urine~a*(1-exp(-c*water)), data = eagle, start = list(a=550, c=0.00385))
  </code></pre>
  
  <p>and then I generate my plot using:</p>
  
  <pre><code>av &lt;- seq(0,1200, 0.5)
  bv &lt;- predict (model2, data=eagle, list(water=av))
  plot (urine~water, data = eagle)
  lines (av,bv)
  </code></pre>
  
  <p>I want to draw on some dotted lines for upper and lower 95% confidence intervals.  I have managed to write code for my linear regression analyses but I am struggling with the current nonlinear regression.  The following code:</p>
  
  <pre><code>a &lt;- predict (model2, newdata=data.frame(water=av), interval="confidence")
  </code></pre>
  
  <p>for linear regressions this gives me a dataframe with three columns for fit, lwr and upr.  With my nonlinear regression it just gives me a list of numbers which I cant do anything with.  Any suggestions?  Is there a simple way to get upper and confidence lines for a nonlinear regression?</p>