# Power Analysis for Logistic Regression/Cox Proportional Hazards Model

I am having trouble with a power analysis for these 2 types of models. I am trying to assess how pregnancy weight gain (<10 lbs and >40 lbs vs 20-29 lbs) affects benign breast disease.

However, there really isn't any preliminary data on this and consequently I am not sure how to go about getting the Pr(Y=1|X=1) under H0 and H1 for logistic regression. I do not have data on the proportion of people falling into each of the 3 bins but I assume that they are not roughly equal as most women gain the referent amount of weight (20-40lbs max).

I have the same problem with my Cox proportional hazards model: How does the timing at which food is consumed (<3 months of age and >6 months vs 3-6 months of age) affect diabetes (yes/no)? I do have data on these proportions and they are approximately 27%, 44%, 27%. Any help would be appreciated!!

• It is not statistically appropriate to transform weight gain using a discontinuous function. Also, it is almost always better to model the initial and final weight instead of assuming that the ratio of their coefficients is -1.0. – Frank Harrell Jan 14 '17 at 17:16
• Unfortunately I did not have any control over this. The data was already collected and set up in that manner (i.e. the women were asked to bubble in their weight gain in each of those categories). – Moony Jan 14 '17 at 17:47
• Just be clear that the study will not answer the question of how weight gain associates with disease likelihood. It may answer the question of whether a very limited estimate of weight gain is associated with disease. – Frank Harrell Jan 14 '17 at 18:20
• Will do, but do you have any thoughts on how to go about the power analysis for this? – Moony Jan 14 '17 at 18:54
• If there's no preliminary data there should be an opportunity to redesign the data collection instrument to get better data prospectively. Power is easier to deal with if you just consider one comparison instead of two, using for example the R Hmisc package cpower function for the Cox proportional hazards model. For a binary outcome you can power to detect a difference in probabilities (e.g., Hmisc function bpower). Better would be to size the study to yield a set precision (multiplicative margin of error in estimating an effect ratio). – Frank Harrell Jan 14 '17 at 19:38