data(simScenario5)
dataFormt<-oceFormat(data=simScenario5, oceTime=c("T1","T2","T3"),
oceStatus=c("I1","I2","I3"), group=c("Z"),
oceNames = c("Death","Stroke/MI","Bleed"))
npmleOutput<- oceNPMLE(dataFormt)
plot(npmleOutput, xlab="Custom x label", mark.time=FALSE, lwd=2)
# can add lines from coxph output
coxOutput<- oceCoxph(dataFormt)
plot(coxOutput,linesonly=TRUE, col=c("orange","purple"),lwd=2)
legend("bottomleft",
legend=c("grp=0, NPMLE","grp=1, NPMLE","grp=0, coxph","grp=1, coxph"),
col=c("red","blue","orange","purple"),lty=c(1,1,1,1),lwd=2)
Run the code above in your browser using DataLab