if (FALSE) {
## estimation of a joint latent class model with 2 latent classes (ng=2)
# (see the example section of Jointlcmm for details about
# the model specification)
m <- Jointlcmm(fixed= Ydep1~Time*X1,random=~Time,mixture=~Time,subject='ID'
,survival = Surv(Tevent,Event)~ X1+X2 ,hazard="Weibull"
,hazardtype="PH",ng=2,data=data_lcmm,logscale=TRUE,
B=c(0.7608, -9.4974 , 1.0242, 1.4331 , 0.1063 , 0.6714, 10.4679, 11.3178,
-2.5671, -0.5386, 1.4616, -0.0605, 0.9489, 0.1020 , 0.2079, 1.5045))
summary(m)
## Computation of the EPOCE on the same dataset as used for
# estimation of m with times at predictions from 1 to 15
VecTime <- c(1,3,5,7,9,11,13,15)
cvpl <- epoce(m,var.time="Time",pred.times=VecTime)
summary(cvpl)
plot(cvpl,bty="l",ylim=c(0,2))
}
Run the code above in your browser using DataLab