Skip to main content
. Author manuscript; available in PMC: 2023 Feb 1.
Published in final edited form as: Eur J Epidemiol. 2022 Jan 3;37(2):173–194. doi: 10.1007/s10654-021-00815-8

Table 2.

Example of stacked right censoring and left truncation weighted data to allow prediction with time-covariate interactions

ID Exposed Start Stop Event G^(tj)G^(Xj) H^(tj)H^(Xj) wi (tj) Exposed × log(Stop)
1 1 0.6 3.8 1 1.0 1.0 1.0 1.3
2 0 2.7 3.8 1 1.0 1.0 1.0 0.0
2 0 3.8 5.0 1 1.0 1.0 1.0 0.0
2 0 5.0 6.8 1 1.0 1.0 1.0 0.0
3 1 0.2 3.8 1 1.0 1.0 1.0 1.3
3 1 3.8 5.0 1 1.0 1.0 1.0 1.6
4 1 1.2 3.8 0 1.0 1.0 1.0 1.3
4 1 3.8 5.0 0 1.0 1.0 1.0 1.6
4 1 5.0 5.1 0 1.0 1.0 1.0 1.6
5 0 3.0 3.8 0 1.0 1.0 1.0 0.0
5 0 3.8 5.0 0 1.0 1.0 1.0 0.0
5 0 5.0 6.5 0 1.0 1.0 1.0 0.0
6 1 1.4 2.3 2 1.0 1.0 1.0 0.8
6 1 2.3 3.8 2 1.0 1.3 1.3 1.3
6 1 3.8 5.0 2 1.0 1.3 1.3 1.6
6 1 5.0 6.8 2 0.3 1.3 0.4 1.9

Event takes value 1 for AIDS, 2 for SI switching, and 0 for censoring. G^(tj)G^(Xj) is the right censoring weight, H^(tj)H^(Xj) is the left truncation weight, and wi(tj)=G^(tj)H^(tj)G^(Xj)H^(Xj) is the inverse probability of censoring and left truncation weight.