data(PBC)
plot(PBC$owin,main="PBC liver disease data")
points(PBC$data$x[PBC$data$ID==0],
PBC$data$y[PBC$data$ID==0]) #controls
points(PBC$data$x[PBC$data$ID==1],
PBC$data$y[PBC$data$ID==1], col = 2) #cases
legend("bottomleft", legend = c("case", "control"),
pch = c(1, 1), col = c(2, 1))Run the code above in your browser using DataLab