I substantively use the AnthonyC solution by means of a small function that prunes the stratified terms from the model:
library(survival)
library(survminer)
colon <- within(colon, {
sex <- factor(sex, labels = c("female", "male"))
differ <- factor(differ, labels = c("well", "moderate", "poor"))
extent <- factor(extent, labels = c("submuc.", "muscle", "serosa", "contig."))})
stratamodel <- coxph(Surv(time, status) ~ sex + strata(rx) + adhere +
differ + extent + node4,
data = colon )
prun<-function(model) {
if (any(grepl("strata", names(attr(model$terms, "dataClasses"))))) {attr(model$terms, "dataClasses")<-attr(model$terms, "dataClasses")[-which(grepl("strata", names(attr(model$terms, "dataClasses"))))]}
model
}
windows(8,8);ggforest(prun(stratamodel), data=colon, main="Stratified model")