I am trying to find out, whether I have enough power to conduct a Cox proportional hazards model using R. My predictor is intelligence and my outcome is cancer. My sample size is 22,000 and I predict 600 cancer cases over 25 years. Furthermore, I would like to know, whether I have enough power to test gender interactions, if half of my sample if female and 200 of the 600 cancer cases are. I predict a hazard ratios of at least 1.3. The functions that I have found in R all require a binary predictor, but intelligence is metric, and I could not find any functions for that.
Asked
Active
Viewed 326 times
0
-
1Welcome to StackOverflow ! Your first question appears to be better suited for [Cross Validated](http://stats.stackexchange.com/) as it is a statistical question. For your second question please provide some of your code and data so that we may help you. You can read [this](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) to guide you. – etienne Nov 26 '15 at 12:52
-
1the coxph function in the survival package certainly allows continuous predictor variables ... – Ben Bolker Nov 26 '15 at 12:57
-
fyi coxph is in the survival library – Yuval Spiegler May 14 '17 at 14:11