Hi there!
I am fitting a Cox proportional hazards model to a subgroup of my data but I keep receiving the following error: flat region resulting in a missing likelihood
A snapshot of the structure of my data is below:
My code for the model is:
I have tried different methods to handle tied failures (efron, exactm, exactp), as well as increasing the number of iterations but I keep running into the same issue. Any advice of other options to try to help the model converge would be much appreciated.
Thank you!
I am fitting a Cox proportional hazards model to a subgroup of my data but I keep receiving the following error: flat region resulting in a missing likelihood
A snapshot of the structure of my data is below:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long participantid byte visit str8 subgroup float exposure byte outcome float(covariate time) 1 1 "group1" 0 0 .8414373 0 1 2 "group1" 0 0 .8414373 28 1 3 "group1" 0 0 .8414373 84 1 4 "group1" 0 0 .8414373 147 1 5 "group1" 0 0 .8414373 231 2 1 "group1" 1 0 .6503111 0 2 2 "group1" 1 0 .6503111 28 2 4 "group1" 1 0 .6503111 165 2 5 "group1" 1 0 .6503111 257 2 6 "group1" 1 0 .6503111 348 2 7 "group1" 1 0 .6503111 428 3 1 "group1" 0 0 .56734204 0 3 2 "group1" 1 0 .56734204 114 3 3 "group1" 1 0 .56734204 212 4 1 "group1" 0 0 .8987436 0 4 2 "group1" 1 0 .8987436 70 4 3 "group1" 1 0 .8987436 96 4 4 "group1" 1 0 .8987436 131 4 5 "group1" 1 0 .8987436 174 4 6 "group1" 1 0 .8987436 517 4 7 "group1" 1 0 .8987436 1237 5 1 "group1" 1 0 .3669614 0 5 2 "group1" 1 0 .3669614 35 5 3 "group1" 1 0 .3669614 63 5 4 "group1" 1 0 .3669614 91 5 5 "group1" 1 0 .3669614 117 5 6 "group1" 1 0 .3669614 222 5 7 "group1" 1 0 .3669614 336 end
My code for the model is:
Code:
stset time, failure(outcome==1) id(participantid) sc(30.4) stcox exposure covariate if subgroup=="group2"
Thank you!
Comment