title: Finding the prediction interval with polynomial
body: <p>From the following code, I am trying to find the prediction intervals (95%) when "circulations" are 0.5 and 20:</p>
  
  <pre><code>AdvRev = read.csv(url("http://www.stat.tamu.edu/~sheather/book/data_sets.php/AdRevenue.csv"), header=TRUE)
  y = AdvRev$AdRevenue
  x = AdvRev$Circulation
  
  xsquared=x^2
  xcubed=x^3
  #I used polynomial regression since it fits better than y~x
  m6 = lm(y~x+xsquared+xcubed, data=AdvRev) 
  
  #Bad leverage points were removed from the model.
  m9 &lt;- update(m6, subset=(1:70)[-c(2,5,8,20,49,60)])  
  summary(m9)
  </code></pre>
  
  <p>Trying to use the following code to find the interval for the final fitted model (m9):</p>
  
  <pre><code>predict(m9, newdata=data.frame(x = c(0.5,20)), interval="prediction",level=0.95)
  </code></pre>
  
  <p>However, it is not giving a valid answer. If you may correct my final code, I would really appreciate it.</p>