# NOT RUN {
tteModel1 <- inlineModel("
[LONGITUDINAL]
input = {beta,lambda}
EQUATION:
h=(beta/lambda)*(t/lambda)^(beta-1)
DEFINITION:
e = {type=event, maxEventNumber=1, rightCensoringTime=70, hazard=h}
")
p1 <- c(beta=2.5,lambda=50)
e <- list(name='e', time=0)
res1 <- simulx(model=tteModel1, parameter=p1, output=e, group=list(size=100))
pl1 <- kmplotmlx(res1$e,level=0.95)
print(pl1)
p2 <- c(beta=2,lambda=45)
g1 <- list(size=50, parameter=p1)
g2 <- list(size=100, parameter=p2)
res2 <- simulx(model=tteModel1, output=e, group=list(g1,g2))
pl2 <- kmplotmlx(res2$e)
print(pl2)
# }
Run the code above in your browser using DataLab