title: Using the predict() function with glm
body: <p>Let's say that I have the following data set and am running a regression model using glm in R. I have the coefficients, but I want to predict "next months" value (visits). How would I go about that in this example.</p>
  
  <pre><code>d &lt;- data.frame(month = c("jan", "feb", "mar", "apr", "may", "june"),
                  visit =  c( 1,  2,  4,  8, 16, 32),
                  click =  c(64, 62, 36,  5,  6,  3),
                  conv =  c(1, 3, 6, 2, 3, 8))
  d
  dFit &lt;- glm(visit ~ click + conv, data=d)
  </code></pre>
  
  <p>For July, how can I use the <code>predict()</code> function in R to predict the number of visits (response variable)?</p>
  
  <p>EDIT:</p>
  
  <p>What I'm trying to eventually get is an out put where I have</p>
  
  <pre><code>Mon   Pred_clicks
  jan   20
  feb   25
  mar   21
  apr   31
  may   15
  june  21 
  july  50
  </code></pre>
  
  <p>EDIT 2:</p>
  
  <p>This isn't the output I'd like</p>
  
  <pre><code>&gt; predict(dFit)
          1         2         3         4         5         6 
  -3.452974  1.223969 13.533457 12.235771 14.113888 25.345890 
  </code></pre>