 What core configurations should be used in settings.php for a production site?
 Wildcard path element for content type, based on referenced taxonomy as restriction
 Can you override a library per environment?
 Price display on nodeproduct .tpl
 Drupal 8 rest login cookie token explanation
 Is it okay to sit down during workout sets?
 Is aerial firefighting a cost effective way of combating forest fires?
 Is there any amount of safe meat, dairy, or other nonvegan foods?
 Acceptance Rejection Method using Halton Sequence
 The Time Traveler
 simple code demo UI
 Async/Await Computation Expression
 Madlib CLI program, replaces string in text file
 Simplifying Counter of Checked Checkboxes
 Method for returning valid URLs from a sitemap URL
 Count lines of scala code (omitting empty lines) in a directory, traversing any subdirectories
 Embolden parts of autocomplete suggestions that don't match the query
 React widget to display, sort and search remote data
 Can the Logrus move under someone trying to walk it?
 Anime where character finds buried mech suit
Plotting overlaid ROC curves
I'm trying to make overlaid ROC curves to represent successive improvements in model performance when particular predictors are added one at a time to the model. I want one ROC curve for each of about 5 nested models (which I will define manually), all overlaid in one plot. For example:
#outcome var
y = c(rep(0,50), rep(1, 50))
#predictors
x1 = y + rnorm(100, sd = 1)
x2 = y + rnorm(100, sd = 4)
#correlations of predictors with outcome
cor(x1, y)
cor(x2, y)
library(Epi)
ROC(form = y ~ x1, plot = "ROC)
ROC(form = y ~ x1 + x2, plot = "ROC")
I'd want the two ROC curves on the same plot (and ideally without the distracting model info in the background). Any ggplot/graphics gurus willing to lend a hand?
The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
If you'd like to overlay the ROC curves over each other, you can use

The caTools package provides the colAUC function. Use it and set the plotROC argument to TRUE. I have been satisfied with the graphs it produces.
20171011 01:28:06 
If you'd like to overlay the ROC curves over each other, you can use the roc function from the pROC R package to get the sensitivity and specificity values and plot them out manually,
#outcome var
y = c(rep(0,50), rep(1, 50))
#predictors
x1 = y + rnorm(100, sd = 1)
x2 = y + rnorm(100, sd = 4)
model1 = glm(y ~ x1, family = binomial())
pred1 = predict(model1)
model2 = glm(y ~ x1 + x2, family = binomial())
pred2 = predict(model2)
library(pROC)
roc1 = roc(y, pred1)
roc2 = roc(y, pred2)
Specificity and Sensitivity Values
> str(roc1)
List of 15
\$ percent : logi FALSE
\$ sensitivities : num [1:101] 1 1 0.98 0.98 0.98 0.98 0.98 0.98 0.96...
\$ specificities : num [1:101] 0 0.02 0.02 0.04 0.06 0.08 0.1 0.12 0.12
...
or use the plot function as
plot(roc1, col = 1, lty = 2, main = "ROC")
plot(roc2, col = 4, lty = 3, add = TRUE)
Also, there is also the pROC::ggroc function for ggplot2 plotting abilities.
20171011 01:53:56