title: Plot two curves in logistic regression in R
body: <p>I am running logistic regression in R (glm). I then manage to plot the result. My code is as follow:</p>
  
  <pre><code> temperature.glm = glm(Response~Temperature, data=mydata,family=binomial)
  
   plot(mydata$Temperature,mydata$Response, ,xlab="Temperature",ylab="Probability of Response")
   curve(predict(temperature.glm,data.frame(Temperature=x),type="resp"),add=TRUE, col="red")
   points(mydata$Temperature,fitted(temperature.glm),pch=20)
   title(main="Response-Temperature with Fitted GLM Logistic Regression Line") 
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>How could I plot two logistic regression curve in one plot?</li>
  <li>I got these two coeffiecient from other statistic software. How could I create random data, plug in these two sets of coef(Set 1 and Set 2) and then produce two logistic regression curves?</li>
  </ol>
  
  <p>The models:</p>
  
  <pre><code>                   SET 1
   (Intercept)     -88.4505
   Temperature       2.9677
  
                    SET 2
   (Intercept)    -88.585533
   Temperature      2.972168
  </code></pre>
  
  <p><code>mydata</code> is in 2 columns and ~ 700 rows. </p>
  
  <pre><code>Response Temperature 
  1 29.33 
  1 30.37 
  1 29.52 
  1 29.66 
  1 29.57 
  1 30.04 
  1 30.58 
  1 30.41 
  1 29.61 
  1 30.51 
  1 30.91 
  1 30.74 
  1 29.91 
  1 29.99 
  1 29.99 
  1 29.99 
  1 29.99 
  1 29.99 
  1 29.99 
  1 30.71 
  0 29.56 
  0 29.56 
  0 29.56 
  0 29.56 
  0 29.56 
  0 29.57 
  0 29.51
  </code></pre>