Difference of expected prognostic cross-entropy (EPOCE) estimators and its
95% tracking interval between two joint latent class models estimated with
Jointlcmm
Source: R/Diffepoce.R
Diffepoce.Rd
This function computes the difference of 2 EPOCE estimates (CVPOL or MPOL)
and its 95% tracking interval between two joint latent class models
estimated using Jointlcmm
and evaluated using epoce
function.
Difference in CVPOL is computed when the EPOCE was previously estimated on
the same dataset as used for estimation (using an approximated
cross-validation), and difference in MPOL is computed when the EPOCE was
previously estimated on an external dataset.
Arguments
- epoceM1
a first object inheriting from class
epoce
- epoceM2
a second object inheriting from class
epoce
Value
- call.Jointlcmm1
the
Jointlcmm
call for epoceM1- call.Jointlcmm2
the
Jointlcmm
call for epoceM2- call
the matched call
- DiffEPOCE
Dataframe containing, for each prediction time s, the difference in either MPOL or CVPOL depending on the dataset used, and the 95% tracking bands (TIinf and TIsup)
- new.data
a boolean for internal use only, which is FALSE if computation is done on the same data as for
Jointlcmm
estimation, and TRUE otherwise.
Details
This function does not apply for the moment with multiple causes of event (competing risks).
From the EPOCE estimates and the individual contributions to the prognostic
observed log-likelihood obtained with epoce
function on the same
dataset from two different estimated joint latent class models, the
difference of CVPOL (or MPOL) and its 95% tracking interval is computed.
The 95% tracking interval is:
Delta(MPOL) +/- qnorm(0.975)*sqrt(VARIANCE) for an external dataset
Delta(CVPOL) +/- qnorm(0.975)*sqrt(VARIANCE) for the dataset used in
Jointlcmm
where Delta(CVPOL) (or Delta(MPOL)) is the difference of CVPOL (or MPOL) of the two joint latent class models, and VARIANCE is the empirical variance of the difference of individual contributions to the prognostic observed log-likelihoods of the two joint latent class models.
See Commenges et al. (2012) and Proust-Lima et al. (2012) for further details.
References
Commenges, Liquet and Proust-Lima (2012). Choice of prognostic estimators in joint models by estimating differences of expected conditional Kullback-Leibler risks. Biometrics 68(2), 380-7.
Proust-Lima, Sene, Taylor, Jacqmin-Gadda (2014). Joint latent class models for longitudinal and time-to-event data: a review. Statistical Methods in Medical Research 23, 74-90.
Examples
# \dontrun{
#### estimation with 2 latent classes (ng=2)
m2 <- 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,
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),logscale=TRUE)
m1 <- Jointlcmm(fixed= Ydep1~Time*X1,random=~Time,subject='ID'
,survival = Surv(Tevent,Event)~ X1+X2 ,hazard="Weibull"
,hazardtype="PH",ng=1,data=data_lcmm,
B=c(-7.6634, 0.9136, 0.1002, 0.6641, 10.5675, -1.6589, 1.4767, -0.0806,
0.9240,0.5643, 1.2277, 1.5004))
## EPOCE computation for predictions times from 1 to 6 on the dataset used
## for estimation of m.
VecTime <- c(1,3,5,7,9,11,13,15)
cvpol1 <- epoce(m1,var.time="Time",pred.times=VecTime)
#> Be patient, epoce function is running ...
#> The program took 0.26 seconds
cvpol1
#> Expected Prognostic Observed Cross-Entropy (EPOCE) of the joint latent class model:
#>
#> Jointlcmm(fixed = Ydep1 ~ Time * X1, random = ~Time, subject = "ID",
#> ng = 1, survival = Surv(Tevent, Event) ~ X1 + X2, hazard = "Weibull",
#> hazardtype = "PH", data = data_lcmm)
#>
#> EPOCE estimators on data used for estimation:
#> Mean Prognostic Observed Log-likelihood (MPOL)
#> and Cross-validated Prognostic Observed Log-likelihood (CVPOL)
#> (CVPOL is the bias-corrected MPOL obtained by approximated cross-validation)
#>
#> pred. times N at risk N events MPOL CVPOL
#> 1 300 150 1.892619 1.906395
#> 3 299 150 1.889432 1.903253
#> 5 291 149 1.899210 1.913254
#> 7 258 127 1.785964 1.799345
#> 9 205 107 1.850733 1.865251
#> 11 158 81 1.793531 1.809033
#> 13 129 68 1.772987 1.789439
#> 15 99 49 1.656587 1.673814
#>
cvpol2 <- epoce(m2,var.time="Time",pred.times=VecTime)
#> Be patient, epoce function is running ...
#> The program took 0.48 seconds
cvpol2
#> Expected Prognostic Observed Cross-Entropy (EPOCE) of the joint latent class model:
#>
#> Jointlcmm(fixed = Ydep1 ~ Time * X1, mixture = ~Time, random = ~Time,
#> subject = "ID", ng = 2, survival = Surv(Tevent, Event) ~
#> X1 + X2, hazard = "Weibull", hazardtype = "PH", data = data_lcmm,
#> logscale = TRUE)
#>
#> EPOCE estimators on data used for estimation:
#> Mean Prognostic Observed Log-likelihood (MPOL)
#> and Cross-validated Prognostic Observed Log-likelihood (CVPOL)
#> (CVPOL is the bias-corrected MPOL obtained by approximated cross-validation)
#>
#> pred. times N at risk N events MPOL CVPOL
#> 1 300 150 1.869272 1.886070
#> 3 299 150 1.840027 1.860890
#> 5 291 149 1.853149 1.874388
#> 7 258 127 1.735359 1.756333
#> 9 205 107 1.773111 1.795867
#> 11 158 81 1.672144 1.695271
#> 13 129 68 1.628349 1.653144
#> 15 99 49 1.463446 1.487694
#>
DeltaEPOCE <- Diffepoce(cvpol1,cvpol2)
summary(DeltaEPOCE)
#> Difference in Expected Prognostic Observed Cross-Entropy (EPOCE) estimates
#> from the two following joint latent class models:
#>
#> Jointlcmm(fixed = Ydep1 ~ Time * X1, random = ~Time, subject = "ID",
#> ng = 1, survival = Surv(Tevent, Event) ~ X1 + X2, hazard = "Weibull",
#> hazardtype = "PH", data = data_lcmm)
#> Jointlcmm(fixed = Ydep1 ~ Time * X1, mixture = ~Time, random = ~Time,
#> subject = "ID", ng = 2, survival = Surv(Tevent, Event) ~
#> X1 + X2, hazard = "Weibull", hazardtype = "PH", data = data_lcmm,
#> logscale = TRUE)
#>
#> Difference in the Cross-Validated Prognostic Observed Log-likelihood (CVPOL)
#> and its 95% tracking interval
#>
#> pred. times Diff CVPOL 95%TIinf 95%TIsup
#> 1 0.02032484 -0.0134220325 0.05407170
#> 3 0.04236342 0.0002114357 0.08451541
#> 5 0.03886617 -0.0041803390 0.08191268
#> 7 0.04301238 -0.0045571082 0.09058187
#> 9 0.06938394 0.0137801969 0.12498769
#> 11 0.11376117 0.0507038450 0.17681850
#> 13 0.13629482 0.0642955138 0.20829412
#> 15 0.18612023 0.1103956560 0.26184480
#>
plot(DeltaEPOCE,bty="l")
# }