I want to develop a logistic regression model. There are 1000 cases in the dataset and there are only 180 'Yes'. Therefore, the proportion is 18%. I was told that I should have at least 500 Yes in the dataset in order to build a good logistic regression model. How can I handle this problem? Do I need to have at least 500 Yes??

  • 3
    $\begingroup$ Who told you that? It's simply not true. $\endgroup$ – AdamO Jan 18 '18 at 19:00
  • 2
    $\begingroup$ I don't think there is a rule about total sample size N, number of successes, and number of covariates (which is another aspect of the problem that you should describe in your question). You might consider using a penalized likelihood model (such as firth logit) or a rare event logit (King and Zeng), and see if you get very different results from the standard case. Another approach is to simulate your data using the estimated parameters to gauge the amount of finite sample bias. $\endgroup$ – Dimitriy V. Masterov Jan 18 '18 at 19:06
  • 1
    $\begingroup$ @DimitriyV.Masterov well, no. Of course the rule cited by the OP makes no sense at all, but you can find a lot of rules to choose your sample size for logistic regression, based on the power of your test to reject the null. For example see here stats.stackexchange.com/questions/11724/… where I would use 0.18 instead than 0.5, given that the sample is unbalanced, or see here stats.stackexchange.com/questions/6067/… $\endgroup$ – DeltaIV Jan 18 '18 at 19:16
  • $\begingroup$ PS 180 "Yes" out of a sample of size $N=1000$ is not a case for serious concern. $\endgroup$ – DeltaIV Jan 18 '18 at 19:20
  • $\begingroup$ I completely agree with other comments that no such rule exists. If the question is about the sufficiency of sample size, I recommend a power analysis. I have provided a relatively complex example to a related question here $\endgroup$ – Matt Barstead Jan 18 '18 at 20:07

Browse other questions tagged or ask your own question.