title: How to create a ROC curve for a model which has log of odds as response?
body: <p>I have a question on plotting <code>ROC curve</code> for my model which has <code>log of odds</code> as the <code>response</code>. For example:</p>
  
  <pre><code>model&lt;-lm((ln(y/1-y)~Temp+RH+DmaxT, data=fit) #'y' is a proportion
  </code></pre>
  
  <p>Predicted response was obtained for a new data set as:</p>
  
  <pre><code>Predicted_model&lt;-predict(model, newdata, type = 'response')
  </code></pre>
  
  <p>Predicted values were back-transformed to get values in proportion</p>
  
  <p>I have new observations in proportion and I used <code>0.05</code> cutoff value to represent control (&lt;0.05) and cases (>0.05)</p>
  
  <pre><code>newdata$observed&lt;-ifelse(newdata$observed &gt; 0.05, "cases", "controls")
  </code></pre>
  
  <p>I plotted ROC curve using the following formula </p>
  
  <pre><code>roc(newdata$observed, predicted_model_backtrans, legacy.axes = TRUE, plot = TRUE, print.auc = TRUE)
  </code></pre>
  
  <p>With this formula, I got <code>AUC</code> value 1 and the plot is different than expected. I couldn't figure out what would be the best way to create <code>ROC curve</code> for my model type. Any help would be appreciated.</p>
  
  <p>I also tried to create ROC curve where I changed observed and predicted proportion into binary characteristics (control (<code>&lt;0.05</code>) and cases (<code>&gt;0.05</code>)) which gave me straight line curve rather than smooth.</p>