This question already has an answer here:
- Sample size for logistic regression? 6 answers
Trying to find a sample size for logistic regression I found a rule of thumb in http://www.medcalc.org/manual/logistic_regression.php
Sample size considerations. Sample size calculation for logistic regression is a complex problem, but based on the work of Peduzzi et al. (1996) the following guideline for a minimum number of cases to include in your study can be suggested. Let p be the smallest of the proportions of negative or positive cases in the population and k the number of covariates (the number of independent variables), then the minimum number of cases to include is: N = 10 k / p If the resulting number is less than 100 you should increase it to 100 as suggested by Long (1997).
I understand there are extra complexities like statistical power, stability and orthogonality of the variables.
But anyways, my question is if the fact that I have categorical variables would affect the sample needed. I ask this because for every level of a categorical variable you have one parameter.
More precisely, do I have to count every level of categorical variables as different variables to calculate sample size?