Strengthen your programming skills with tips and techniques from the experts
Simulate data from a logistic regression model: How the intercept parameter affects the probability of the event
This article shows that you can use the intercept parameter to control the probability of the event in a simulation study that involves a binary logistic regression model. For simplicity, I will simulate data from a logistic regression model that involves only one explanatory variable, but the main idea applies