In this article address how much data you need in order to run standard logistic regression analyses.
As is the case in essentially all statistical analysis, the amount of data you need in logistic regression depends on the number of parameters that you are trying to estimate. In regression (both logistic regression and regular least-square regression), the number of parameters you are trying to estimate depends on the number of independent -variables in the model. That is, there is a relationship between the number of observations and the number of -variables. So the sample size issue can be viewed in two ways. The first is, given a number of -variables, how many observations do I need? The second is, given a number of observations, how many -variables can I use?
In logistic regression (in comparison to regular least-squares regression), there is an additional issue created by the fact that the dependent Y-variable is dichotomous. In regular least-square regression, when we talk about required sample size it is in the context a of situation where all of the values will be different. This has to be the case in least-squares regression if the error term really follows a normal distribution. In practice, you may have some stacking up of values (because of rounding, for example), but almost all of the -values will be different.
In logistic regression, since the -values only take on the values 0 or 1, there obviously will be a great deal of stacking up of the values. Thus, how many -variable I can fit also involves how “spread out” the -values are. This is captured by looking at the minimum number of 0’s and 1’s.
the number of 1’s
What we need in logistic regression is for to be about 10 times the number of parameters.In logistic regression, the number of parameters is one more than the number of ‘s (because there is one additional parameter for the intercept). So if there are -variables, you need
Please note that this is a rule of thumb. As such, it is an approximation which may not work in all circumstances.
Here is an example. Suppose that I have 436 observations and 78 were “successes” with the rest “failures” (i.e., failures). Then . This means that I can fit -variables. So my model can have 6 to 7 -variables.
For more information, see the book Applied Logistic Regression (Wiley Series in Probability and Statistics). This topic is addressed in Chapter 10 (“Special Topics”) in Section 10.5 (“Sample Size Issues When Fitting Logistic Regression Models”).