R语言条件logistic回归笔记
数据结构:
library(haven)
data <- read_sav("C:/Users/Administrator/Desktop/0810SPSS.sav")
library(survival)
mydata1<-data.frame(data)
model23<-clogit(y~BPE2+strata(mydata1[2]),data = mydata1)
summary(model23)
model2<-coxph(Surv(time,y)~BPE2+strata(mydata1[2]),data = mydata1)
summary(model2)