# Is there a relationship between number of covariates and sample size in logistic regression? [duplicate]

Is there some definite relationship between number of covariates and the sample size in logistic regression? (e.g. larger the number of covariates, larger the sample size needed, etc.)

Thank you,

## marked as duplicate by whuber♦ regression StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 25 at 22:45

• When we have other confounding variables or covariates that we need to adjust for. – Penguin_Knight Jan 25 at 21:39
• but even when there are confounding variables, is the best model in terms of the power analysis always the model that includes least number of covariates (including the confounders)? – HDC Jan 25 at 21:41
• Presuming there's no penalty for model complexity or data collection costs, the best model is found among those that have all the covariates that matter and only those. The problem is that in many cases nobody knows what they are! – whuber Jan 25 at 21:53
• see Harrell Regression Modeling Strategies chapter 4. For clinical biostatistical applications, rule of thumb is that n/p ~ 10-20, where n is min(number of successes, number of failures) and p is number of parameters to estimate. – Ben Bolker Jan 25 at 22:25