# Generate N = 1000 observations from the Mease model
set.seed(2254) # for reproducibility
mease <- gen_mease(1000, nsim = 1)
# Plot predictor values colored by binary outcome
cols <- palette.colors(2, palette = "Okabe-Ito", alpha = 0.3)
plot(x2 ~ x1, data = mease, col = cols[mease$yclass1 + 1], pch = 19)
Run the code above in your browser using DataLab