Sample to small for logistic regression: can I group my continuous variables and use some other test? I was suggested to use logistic regression in order to examine if different levels of antibodies in animals influence parasite isolation rates from their tissues. However, my total sample comprises of only 45 animals, so when I tried regression after all, Hosmer and Lemeshow test showed p-value well below 0.05... I was wondering if I could group data regarding antibody levels (for example, group 1 would be animals with titres below 25, group 2 animals with titres of 25, group 3 animals with titres of 50 and group 4 animals with titres equal or higher than 100) and use some other test instead of regression, for the same purpose? Thank you...
 A: We would probably need more information to give you a reliable answer. As a general rule, though, binning leads to lower power rather than higher power. In general small sample sizes won't lead to rejection of goodness-of-fit by the Hosmer-Lemeshow test - the opposite if anything. If Hosmer-Lemeshow is failing, the best thing to do is to look at your data - plot the data (y= parasite isolation=1 vs no parasites isolated=0 vs. x=titer) and superimpose the fitted logistic regression line and try to figure out what's going on. You might be able to use a tool such as binnedplot from the arm package in R to visualize the pattern of the residuals.
It's possible that your signal is actually too strong - e.g. if you have complete separation (e.g., all individuals above a certain level of titer have parasites isolated, and none below that level do), in which case you would probably want to use bias-reduced/penalized/Firth regression.
How many responses do you have in each category (no isolation vs. isolation)? If your responses are too unbalanced (e.g. if you only isolated parasites in 5 animals out of 45), you might not be able to do anything sensible on a formal statistical level - in that case I would probably just report the range of titers and the min, median, and max titers of the less common outcome and let readers draw their own conclusions.
