Leukemia in North East England example

Download: dataset  graph.file

R Code:


leuk=read.table("leuk.dat",header=T)
leuk$sex=1*(leuk$sex==1)


## time line divided  in 50 intervals                                       
formula1=inla.surv(time,cens)~sex+
         age +
         wbc +
         f(inla.group(tpi,n=50),model="rw2")+
         f(district,model="besag",graph.file="NE.graph")

model1 = inla(formula1, family="coxph",
  data=leuk, verbose=TRUE,
  control.hazard=list(model="rw1",n.intervals=20,param=c(1,0.001)))


Comments