# test1
test1=data.frame(
time= c(2, 5, 1, 7, 9, 5, 3, 6, 8, 9, 7, 4, 5, 2, 8),
status=c(0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1),
z= c(2, 1, 1, 3, 5, 6, 7, 9, 3, 0, 2, 7, 3, 9, 4)
)
isoph.fit1=isoph(Surv(time, status)~iso(z,shape="inc"),data=test1)
print(isoph.fit1)
plot(isoph.fit1)
# test2
test2=data.frame(
time= c(2, 5, 1, 7, 9, 5, 3, 6, 8, 9, 7, 4, 5, 2, 8),
status=c(0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1),
z= c(2, 1, 1, 3, 5, 6, 7, 9, 3, 0, 2, 7, 3, 9, 4),
trt= c(1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0)
)
isoph.fit2=isoph(Surv(time, status)~iso(z,shape="inc")+trt, data=test2)
print(isoph.fit2)
plot(isoph.fit2)
Run the code above in your browser using DataLab