Your problem appears to be with coxphw, not coxph. I have never before heard of the coxphw function; you should identify what package it is from in your request, and perhaps also contact the author. If you have found a similar issue in survfit I would be glad to see an example. Terry Therneau (author of coxph and survfit)