Conditional logistic regression for pairs of couples

I am trying to run conditional logical 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 a resume. My question is how to graphically represent the result? I need it because I am very new to R-graphics. I tried the vcd package. I can get a mosaic plot for some other dummy data. But I want to build the results of the clogit model.

+7
r plot
source share
2 answers

If you want to build an S curve, this will do the code below.

 x <- -7:7 y <- 1 / (1 + exp(-x)) #Sigmoid Logistic function plot(x,y,col="DarkGreen",pch=19,lwd=1) 
0
source share

I don’t think you can get to the survival curve through clogit. Conditional logistic regression does not automatically take survival time into account; it is simply related to membership in strata that contain consistent cases and controls how the Cox model deals with survival time (hence its appearance in the survival package).

If you are interested in assessing basic survival and dangerous functions, I think you will need to use a survival model such as coxph, or you can simply estimate the survival curve directly with survival.

0
source share

All Articles