# \donttest{
# Data simulation
set.seed(1)
simul <- SimulateRegression(
n = 500, pk = 20,
family = "binomial", ev_xy = 0.8
)
# Logistic regression
fitted <- glm(simul$ydata ~ simul$xdata, family = "binomial")$fitted.values
# Constructing the ROC curve
roc <- ROC(predicted = fitted, observed = simul$ydata)
plot(roc)
# }
Run the code above in your browser using DataLab