# Cox model - full cohortbissau <-read.csv("data/bissau.csv")bissau$agem <-as.integer(bissau$age/30.4)library(survival)options(contrasts=c("contr.treatment", "contr.poly"))coxph(Surv(fuptime, dead !=0) ~factor(bcg) +factor(agem), data = bissau)
Call:
coxph(formula = Surv(fuptime, dead != 0) ~ factor(bcg) + factor(agem),
data = bissau)
coef exp(coef) se(coef) z p
factor(bcg)1 -0.34720 0.70667 0.14605 -2.377 0.0174
factor(agem)1 0.11500 1.12187 0.23205 0.496 0.6202
factor(agem)2 -0.25687 0.77347 0.25861 -0.993 0.3206
factor(agem)3 0.19894 1.22011 0.24325 0.818 0.4135
factor(agem)4 0.33252 1.39447 0.24183 1.375 0.1691
factor(agem)5 0.33066 1.39189 0.24957 1.325 0.1852
factor(agem)6 -0.01052 0.98953 0.35340 -0.030 0.9762
Likelihood ratio test=12.37 on 7 df, p=0.08901
n= 5274, number of events= 222
# Case-cohort databis2 <-subset(bissau, s ==0& dead !=0| s ==1)ccfit <-cch(Surv(fuptime, dead!=0) ~factor(bcg) +factor(agem), data = bis2, subcoh=bis2$s, id=bis2$id, cohort.size=nrow(bissau))summary(ccfit)