I'm trying to run a conditional logistic regression for data which is similar to the example below:
table.10.3 <- data.frame(pair=rep(1:144,rep(2,144)),
MI=rep(c(0,1),144),
diabetes=c(rep(c(1,1),9),
rep(c(1,0),16),
rep(c(0,1),37),
rep(c(0,0),82))
)
# head(table.10.3)
# pair MI diabetes
# 1 0 1
# 1 1 1
# 2 0 1
# 2 1 1
# 3 0 1
# 3 1 1
library("survival")
fit.CLR <- clogit(MI ~ diabetes + strata(pair), method="exact", data=table.10.3)
summary(fit.CLR)
I get the summary. My question is how do I regpresent the result graphically? I need held as I am very new to R plotting. I tried vcd package. I am able to get the mosaic plot for some other dummy data. But I want to plot the results of the clogit model.
I don't think you can get to a survival curve via clogit. Conditional logistic regression doesn't automatically account for survival time; it just deals with membership in strata that contain matched cases and controls the way a Cox model deals with survival times (hence its appearance in the 'survival' package).
If you're interested in estimating the baseline survival and hazard functions, I think you'll need to use a survival model like coxph, or you could just estimate the survival curve directly with survfit.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With