Ordinary end-of-study longitudinal TMLE#
This study validates cleverly’s ordinary, non-cross-fitted two-time-point regimen mean. The law
has monotone censoring and includes static and dynamic plans. The canonical comparison uses R
ltmle 1.3-0. The parameter, longitudinal
double robustness, and efficient influence curve follow Bang and Robins (2005), van der Laan and
Gruber (2012), and Petersen et al. (2014).
Agreement with R is secondary to the finite-support functional and Gateaux EIF in
tests/discrete_law_longitudinal.py.
What was compared#
setting |
|
R |
|---|---|---|
datasets |
1,600 censored samples generated in Python |
the identical rows |
plans |
never treat, always treat, and “treat, then continue if L2 is positive” |
the same three, invoked once per regimen |
contrasts |
always-minus-never and dynamic-minus-never |
the same, from the difference of the two rowwise influence curves so covariance is preserved |
mechanisms |
the generating treatment and censoring probabilities |
the same |
sequential regressions |
follower-stratified quasibinomial |
the same |
cumulative-g bounds |
nonbinding |
nonbinding |
intervals |
pointwise 95% identity-scale Wald, influence-curve variance |
the same, |
The paired discrepancies are numerical-solver scale rather than statistical scale. Each implementation is also tested against quadrature truth on its own, and both verdicts are carried beside the paired one. A regeneration fails if either is false.
Accuracy against known truth#
law |
estimand |
what was tested |
implementation |
bias (99% interval) |
coverage |
SE ratio |
result |
|---|---|---|---|---|---|---|---|
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat at both times” against “treat at neither time” |
|
-0.0025 to 0.0015 |
0.9413 |
0.9890 |
pass |
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat at both times” against “treat at neither time” |
R |
-0.0025 to 0.0015 |
0.9413 |
0.9890 |
pass |
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat, then continue only if L2 is positive” against “treat at neither time” |
|
-0.0025 to 0.0016 |
0.9387 |
0.9943 |
pass |
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat, then continue only if L2 is positive” against “treat at neither time” |
R |
-0.0025 to 0.0016 |
0.9387 |
0.9943 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at both times |
|
-0.0015 to 0.000862 |
0.9506 |
1.0130 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at both times |
R |
-0.0015 to 0.000862 |
0.9506 |
1.0130 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at neither time |
|
-0.0015 to 0.0018 |
0.9450 |
0.9710 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at neither time |
R |
-0.0015 to 0.0018 |
0.9450 |
0.9710 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat, then continue only if L2 is positive |
|
-0.0016 to 0.0010 |
0.9469 |
0.9854 |
pass |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat, then continue only if L2 is positive |
R |
-0.0016 to 0.0010 |
0.9469 |
0.9854 |
pass |
Agreement with the canonical implementation#
Comparator-backed: a paired comparison with ltmle on the same samples. Each row reports estimate equivalence within the declared margin, the RMSE ratio and the coverage difference, and names its comparison kind.
law |
estimand |
what was compared |
paired difference |
share of margin used |
RMSE ratio bound |
coverage difference |
comparison kind |
calibration resolution |
result |
|---|---|---|---|---|---|---|---|---|---|
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat at both times” against “treat at neither time” |
2.101e-10 |
4.449e-08 |
1.0000 |
0 |
matching implementation |
5.021e-10 vs 0.0500 |
equivalent |
two-time-point law with monotone censoring |
|
difference in mean outcome between the plans “treat, then continue only if L2 is positive” against “treat at neither time” |
6.175e-12 |
1.283e-09 |
1.0000 |
0 |
matching implementation |
8.709e-09 vs 0.0500 |
equivalent |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at both times |
8.850e-11 |
3.180e-08 |
1.0000 |
0 |
matching implementation |
9.006e-09 vs 0.0500 |
equivalent |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat at neither time |
-1.216e-10 |
3.133e-08 |
1.0000 |
0 |
matching implementation |
4.273e-10 vs 0.0500 |
equivalent |
two-time-point law with monotone censoring |
|
mean outcome under the plan treat, then continue only if L2 is positive |
-1.155e-10 |
3.766e-08 |
1.0000 |
0 |
matching implementation |
1.753e-08 vs 0.0500 |
equivalent |
Theory properties#
property |
cell |
role |
what was tested |
what must hold |
measured |
result |
|---|---|---|---|---|---|---|
|
|
positive |
dynamic plan: both the outcome regression and the treatment mechanism are correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0019 to 0.0017, margin 0.0062, SE ratio 0.9982 |
pass |
|
|
control |
dynamic plan: both nuisances are misspecified |
bias interval must fall entirely outside the margin, with the reported standard error still on the scale of the empirical spread |
bias 0.0146 to 0.0188, margin 0.0070, SE ratio 0.9802 |
pass |
|
|
positive |
dynamic plan: only the treatment and censoring mechanisms are correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0016 to 0.0022, margin 0.0064, SE ratio 1.0386 |
pass |
|
|
positive |
dynamic plan: only the outcome regression is correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0020 to 0.0017, margin 0.0062, SE ratio 1.0279 |
pass |
|
|
positive |
static plan: both the outcome regression and the treatment mechanism are correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0055 to 0.0030, margin 0.0142, SE ratio 1.0047 |
pass |
|
|
control |
static plan: both nuisances are misspecified |
bias interval must fall entirely outside the margin, with the reported standard error still on the scale of the empirical spread |
bias -0.0288 to -0.0201, margin 0.0146, SE ratio 0.6695 |
pass |
|
|
positive |
static plan: only the treatment and censoring mechanisms are correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0036 to 0.0053, margin 0.0149, SE ratio 1.0132 |
pass |
|
|
positive |
static plan: only the outcome regression is correctly specified |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0040 to 0.0049, margin 0.0151, SE ratio 0.6124 |
pass |
|
|
positive |
dynamic plan: both nuisances are correctly specified with an independently computed efficiency bound |
SE ratio and coverage intervals both inside their calibration bands, with both efficiency-ratio intervals inside their bands |
coverage 0.9282 to 0.9533, SE ratio 0.9552 to 1.0280, empirical efficiency ratio 0.9729 to 1.0461, reported efficiency ratio 0.9967 to 1.0025 |
pass |
|
|
control |
dynamic plan: one efficiency-bound unit of independent noise is added to each estimate |
the empirical efficiency ratio must rise above the band |
coverage 0.8133 to 0.8529, SE ratio 0.6883 to 0.7404, empirical efficiency ratio 1.3502 to 1.4513, reported efficiency ratio 0.9967 to 1.0025 |
pass |
|
|
control |
dynamic plan: the reported standard errors are multiplied by a declared factor below one |
the SE-ratio interval must fall below the calibration band |
coverage 0.8068 to 0.8469, SE ratio 0.6689 to 0.7186, empirical efficiency ratio 0.9737 to 1.0457, reported efficiency ratio 0.6976 to 0.7018 |
pass |
|
|
positive |
static plan: both nuisances are correctly specified with an independently computed efficiency bound |
SE ratio and coverage intervals both inside their calibration bands, with both efficiency-ratio intervals inside their bands |
coverage 0.9397 to 0.9626, SE ratio 0.9671 to 1.0399, empirical efficiency ratio 0.9591 to 1.0307, reported efficiency ratio 0.9942 to 1.0001 |
pass |
|
|
control |
static plan: one efficiency-bound unit of independent noise is added to each estimate |
the empirical efficiency ratio must rise above the band |
coverage 0.8168 to 0.8560, SE ratio 0.6838 to 0.7375, empirical efficiency ratio 1.3532 to 1.4573, reported efficiency ratio 0.9943 to 1.0000 |
pass |
|
|
control |
static plan: the reported standard errors are multiplied by a declared factor below one |
the SE-ratio interval must fall below the calibration band |
coverage 0.8068 to 0.8469, SE ratio 0.6779 to 0.7281, empirical efficiency ratio 0.9590 to 1.0298, reported efficiency ratio 0.6960 to 0.7000 |
pass |
|
|
positive |
static plan: the same test applied to a law with a real effect |
rejection lower bound clears the minimum power |
rejection 0.9700, 0.9508 to 0.9833 |
pass |
|
|
positive |
dynamic plan: bias, coverage and SE calibration at n = 2,000 |
bias inside the margin, coverage clears the floor, SE ratio inside the sanity band |
bias -0.000406, coverage 0.9282 to 0.9688, SE ratio 0.9811 |
pass |
|
|
control |
dynamic plan: bias, coverage and SE calibration at n = 500 |
coverage interval lies below nominal or clears the declared floor |
bias -0.0020, coverage 0.8822 to 0.9353, SE ratio 0.8963 |
pass |
|
|
positive |
dynamic plan: bias, coverage and SE calibration at n = 8,000 |
bias inside the margin, coverage clears the floor, SE ratio inside the sanity band |
bias 0.000337, coverage 0.9326 to 0.9717, SE ratio 1.0063 |
pass |
|
|
positive |
static plan: bias, coverage and SE calibration at n = 2,000 |
bias inside the margin, coverage clears the floor, SE ratio inside the sanity band |
bias -0.000474, coverage 0.9020 to 0.9502, SE ratio 0.9707 |
pass |
|
|
control |
static plan: bias, coverage and SE calibration at n = 500 |
coverage interval lies below nominal or clears the declared floor |
bias -0.0011, coverage 0.8682 to 0.9244, SE ratio 0.8792 |
pass |
|
|
positive |
static plan: bias, coverage and SE calibration at n = 8,000 |
bias inside the margin, coverage clears the floor, SE ratio inside the sanity band |
bias 0.000085, coverage 0.9208 to 0.9637, SE ratio 0.9884 |
pass |
|
|
positive |
dynamic plan: log empirical spread of the estimates regressed on log n across three sizes |
slope interval inside the root-n band and excluding -1/4 |
slope -0.5581 to -0.4904 |
pass |
|
|
positive |
dynamic plan: the same regression applied to the mean reported standard error |
slope interval inside the root-n band and excluding -1/4 |
slope -0.4857 to -0.4776 |
pass |
|
|
positive |
static plan: log empirical spread of the estimates regressed on log n across three sizes |
slope interval inside the root-n band and excluding -1/4 |
slope -0.5482 to -0.4841 |
pass |
|
|
positive |
static plan: the same regression applied to the mean reported standard error |
slope interval inside the root-n band and excluding -1/4 |
slope -0.4786 to -0.4694 |
pass |
|
|
control |
the three regimen means and their two contrasts: the pointwise 95% intervals of the same fits, read jointly |
joint coverage upper endpoint must fall below the nominal rate |
joint coverage 0.7912 to 0.8326 |
pass |
|
|
positive |
the three regimen means and their two contrasts: the max-t multiplier band over every estimand the law reports, from the same-row centered influence curves |
joint coverage interval inside the calibration coverage band |
joint coverage 0.9319 to 0.9563 |
pass |
|
|
positive |
dynamic plan: the estimator fluctuates a misspecified outcome model, so targeting does all the adjusting |
bias interval inside the equivalence margin |
bias -0.0014 to 0.0023, margin 0.0063 |
pass |
|
|
control |
dynamic plan: the identical fit with every fluctuation step removed |
bias interval must fall entirely outside the margin |
bias 0.0239 to 0.0282, margin 0.0073 |
pass |
|
|
positive |
static plan: the estimator fluctuates a misspecified outcome model, so targeting does all the adjusting |
bias interval inside the equivalence margin |
bias -0.0018 to 0.0068, margin 0.0143 |
pass |
|
|
control |
static plan: the identical fit with every fluctuation step removed |
bias interval must fall entirely outside the margin |
bias -0.0242 to -0.0156, margin 0.0144 |
pass |
|
|
positive |
static plan: a confounded law whose true contrast is exactly zero |
one-sided rejection bound stays under the declared type-I ceiling |
rejection 0.0700, 0.0488 to 0.0965 |
pass |
The property study samples the exact binary support law rather than the continuous comparison law. Its longhand functional supplies exact static and dynamic truths, and its Gateaux derivative supplies the efficiency bound without reading either estimator.
The simultaneous_coverage family reads the default band of the calibration fits, 2000
Rademacher draws seeded by random_state=0. The band covers the three regimen means and the two
contrasts. The band draws from its own generator, so every pointwise number of those fits is
unchanged.
Measured values#
Names beginning margin: are thresholds declared before the run. Everything else is measured from
the committed results and checked at the precision printed.
quantity |
value |
source |
|---|---|---|
|
1600 |
paired replications |
|
2000 |
observations per paired replication |
|
10 |
implementation-estimand truth tests |
|
10 |
truth tests passing |
|
5 |
paired estimand comparisons |
|
5 |
paired comparisons passing |
|
32 |
independent property cells |
|
32 |
property cells passing |
|
0.9450 |
joint coverage of the default band over the five regimen parameters |
|
0.8125 |
joint coverage of the pointwise intervals of the same fits |
|
0.0180 |
largest primary standardized bias |
|
0.9387 |
lowest primary coverage |
|
0.9216 |
lowest primary coverage lower endpoint |
|
0.9290 |
lowest primary SE-ratio endpoint |
|
1.0641 |
highest primary SE-ratio endpoint |
|
4.449e-08 |
largest share of paired similarity margin used |
|
1.0000 |
largest paired RMSE-ratio bound |
|
0 |
smallest paired coverage-difference bound |
|
1.969e-08 |
largest paired calibration-excess bound |
|
-0.4195 |
static both-wrong control |
|
0.5944 |
dynamic both-wrong control |
|
0.8988 |
static small-sample control coverage |
|
0.9113 |
dynamic small-sample control coverage |
|
0.9948 |
static empirical spread over exact EIF bound |
|
1.0093 |
dynamic empirical spread over exact EIF bound |
|
0.0700 |
confounded-null rejection rate |
|
0.0965 |
one-sided bound the type-I ceiling is checked against |
|
0.9700 |
alternative rejection rate |
|
0.9020 |
tightest primary property coverage endpoint |
|
0.0435 |
static contrast as the estimator computes it |
|
-0.3447 |
the same recursion with no fluctuation |
|
0.8970 |
dynamic contrast with no fluctuation |
|
0.3909 |
least-displaced contrast, in targeted standard deviations |
|
0.0938 |
largest final-fluctuation move, in standard errors |
|
0.0117 |
median final-fluctuation move, in standard errors |
|
0.9900 |
Monte Carlo confidence level |
|
0.0500 |
test size |
|
0.9500 |
nominal interval coverage |
|
10000 |
bootstrap replications |
|
0.2500 |
standardized-bias margin |
|
0.9000 |
primary coverage floor |
|
0.9900 |
descriptive overcoverage threshold |
|
0.8000 |
primary SE-ratio lower screen |
|
1.2000 |
primary SE-ratio upper screen |
|
0.9300 |
calibration SE-ratio lower bound |
|
1.0700 |
calibration SE-ratio upper bound |
|
0.9200 |
calibration coverage lower bound |
|
0.9800 |
calibration coverage upper bound |
|
0.1000 |
type-I upper bound |
|
0.1500 |
paired similarity margin in pooled SDs |
|
1.1000 |
RMSE-ratio noninferiority bound |
|
-0.0250 |
coverage-difference noninferiority bound |
|
0.0500 |
calibration-excess noninferiority bound |
|
0.8000 |
power lower bound |
|
-0.5000 |
expected root-n slope |
|
-0.6250 |
accepted slope lower bound |
|
-0.3750 |
accepted slope upper bound |
|
-0.2500 |
rate the interval must exclude |
|
0.1000 |
union-model SE-ratio screen, lower limit |
|
10 |
union-model SE-ratio screen, upper limit |
|
0.9000 |
exact-EIF ratio lower bound |
|
1.1000 |
exact-EIF ratio upper bound |
|
0.7000 |
deliberate SE mutation factor |
|
0.2500 |
least the fluctuation must move the estimate |
Limitations#
limitation |
what it means for use |
|---|---|
The static paired comparisons do not witness targeting |
A plug-in built from the same two regressions with no fluctuation at either node still clears both acceptance gates on |
|
The earlier node’s regression is of the already targeted later node. R’s |
The reference’s truth column is not independent of this codebase |
The quadrature truth the R rows are scored against comes from |
The test over-rejects mildly under the harder null |
The rate is 0.0700 at n=4,000 on 800 replications, about 2.6 Monte Carlo standard errors above nominal, and coverage in the same cell is 0.9300. The one-sided bound of 0.0965 clears the predeclared ceiling of 0.1000, so the cell passes, but with roughly three rejections to spare and a point estimate genuinely above 0.05. The influence-curve standard error is slightly optimistic here, and this is published rather than absorbed |
The n=500 cells are controls whose inference the row does not claim |
Each must resolve, placing its exact 99% coverage interval clear of nominal on one side or the other. Below the floor is a published small-sample limitation; at or above it is the estimator turning out to be adequate. Only a straddling interval fails, because it is the one outcome that says nothing |
Positivity is comfortable throughout |
The smallest cumulative mechanism product on the comparison law sits between 0.006 and 0.03, and the property law bounds every conditional into [0.25, 0.75]. No cell here speaks to near-positivity behaviour or to an active bound |
The row is bounded to ordinary end-of-study estimation |
Survival has its own row below. This row excludes competing risks, longitudinal MSMs, observation weights, clustering, flexible learning, cross-fitting, active truncation, and R parity for learned mechanisms. Those are different estimators or compositions and require their own studies |
The causal interpretation requires consistency, sequential exchangeability, longitudinal positivity, and conditionally independent censoring. Single-correct-nuisance cells establish consistency only. Calibrated influence-curve inference is claimed where both nuisance sequences are correct.
Reproduction#
The fixture README gives the regeneration commands. The manifest carries the package checksum, R image digest, source commit, formulas, seeds, and artifact hashes. The replications, paired verdicts and property results carry every published row.
The sharp-null law replaces the outcome probabilities on the cells the contrasted plans traverse and nothing else, so it shares this law’s treatment, censoring, and L2 mechanisms exactly. L2 still moves the outcome from 0.25 to 0.75, censoring is still informative through it, and the first arm still matters. A baseline-only standardisation returns -0.0088 rather than the truth, so the null is one an estimator has to work for. Both contrasts are exactly zero under it. Only the static one is registered as a cell, because a type-I cell needs a nonzero-effect power control and the dynamic contrast’s power at n=4,000 is near 0.43 against a floor of 0.80.