therneau / survival

Survival package for R
394 stars 106 forks source link

Simple vector transformation of predictor (multiplying by 10, 100) produces vastly different coxph results #25

Closed ghost closed 7 years ago

ghost commented 7 years ago

I calculated the waist-to-hip ratio from, well, waist and hip measurements in cm. The ratio's values would come out in the range of 0.8-1.1, for my population.

When I performed a univariate cox proportional hazards regression for the time to incidence of diabetes, I got a stupidly high hazard ratio: 146.4. The risk ratios for my other variables are all well within 0.5-to-5 at most.

The last time something like this occurred, I had a very, very small hazard ratio (which is pretty much the same as a big one, I guess). The result was significant. HbA1c was recorded as decimal values instead of a percentage. So I multiplied it by 100, and the hazard ratio was interpretable, and the resultant p-value still fell within significance. (I got this idea from some StackExchange answer). I didn't understand why that "worked" then, and I don't understand why it isn't working now.

My old result: 146.4, with p-value 0.0004. My new result is now 1.03481, with p-value 0.78. Can anybody help me develop some intuition for what's going on here? All I've done is taken a column of values in excel, and multiplied all the values by 10 or 100.

I'm using R with packages survminer and survMisc, if that makes any difference.

therneau commented 7 years ago
  1. Replacing any covariate x with 10x or x/10 or whatever will not change the p-value. I cannot diagnose your Excel mistake, but obviously there is one.

  2. Coefficients are the estimated effect of a 1 unit change in the covariate. So for instance if age in years is in the model, then the coefficients is the increase per year. If age/10 is put in, the coeff is the increase per decade of age.

  3. Why are you asking a statistical question on the source code page for the survival package? Try r-help instead.

ghost commented 7 years ago

My apologies. I closed the issue immediately after posting, realising that none of the other issues even remotely resembled mine. I don't see a way to delete the post entirely.

Thank you for the response though, I really appreciate it!