C-TMLE candidate sequences#
This study validates the lasso and the declared-learner candidate sequences of cleverly’s
C-TMLE. The canonical comparison uses R ctmle 0.1.2 at
pinned commit
18de559.
The theory is van der Laan and Gruber (2010).
The evidence on this page is Python property evidence, with comparator runs pending. The Python
phase and the property study ran. The R ctmle runs wait for Study queue item 9, so this page
has no paired row and no replay result yet. The reporting publication policy was declared
before the run.
What was compared#
setting |
|
R |
|---|---|---|
scenarios |
|
|
laws |
|
the identical rows |
candidate sequence |
|
the same penalties, or the same four learners and |
datasets |
binary-outcome samples generated in Python with their exact ATE |
the identical rows and all four covariates |
selection folds |
|
|
outcome regression |
a logistic GLM on |
the same GLM |
propensity bounds |
0.025 to 0.975 |
0.025 to 0.975 |
construction loss |
the loss only ( |
the loss plus \(\operatorname{var}(D^*)\), whatever |
selection loss |
the cross-validated loss, unpenalized |
the cross-validated loss, unpenalized ( |
cross-fitting |
disabled for the comparison |
not applicable |
variance |
|
|
The outcome GLM is misspecified on both laws. Each candidate’s TMLE limit therefore depends on
how much of W3 its mechanism reads. tests/unit/test_ctmle_sequences_design.py asserts the
spread of these limits before the run.
The fixture README
lists each declared difference between the two fits. R refits the fluctuation on every row
inside each fold (quirk 2). This leak drives R’s cross-validation toward the last candidate, so
the two selected estimates are not one estimator. The paired rows of the agreement section are
therefore descriptive. They carry no passed column. The red-cell ledger reads none of them.
The file r-selection.csv holds R’s selected candidate of each replicate. The package’s
cross-validated index, final index and accepted candidates stand beside it. The file
r-selection-summary.csv counts the type-1 adapter replicates. Its paired interval reads only
the replicates where ctmleGlmnet completed without the adapter. The interval is therefore
conditional on that event.
The replay gates carry the comparison with R. R writes its outcome and propensity coefficients.
The module tests/studies/ctmle_sequence_replay.py rebuilds R’s arrays from them. It then runs
the package’s construction and final step on R’s arrays and R’s initial outcome fit.
replay gate |
rule, per scenario |
|---|---|
accepted candidates |
identical on every unflagged replicate |
candidate estimates and losses |
within \(10^{-6}\), absolute for an estimate and relative for a loss |
final step, |
for each start that R writes, the final index is identical, and the estimate and every option loss are within \(10^{-6}\) |
counts |
at least 400 unflagged replicates, and for |
The replay leaves out a flagged replicate. A replicate is flagged when a deciding score gap lies
below \(10^{-6}\) of the round’s best score. The clip flag reads the bound
\([1 - \alpha, \alpha]\), which the package applies to each targeted outcome value. R applies it
only to the initial fit and to each accepted update.
scenario |
what R writes |
|
|---|---|---|
|
unbounded estimates and losses |
a targeted value of the package lies at or outside a bound |
|
estimates and losses from R’s targeted values, bounded as the package bounds them |
a targeted value of the package on an observed row lies at or outside a bound. On those rows the two fluctuation fits solve different equations |
The clip flag reads every try that the construction scores. This includes a try that the path
discards.
The file replay-summary.csv records the counts, the flags and the largest gap of each kind. It
also records the largest gaps on the flagged replicates. No gate reads those gaps.
The property study uses a public nested cross-fit configuration: five outer folds, three
selection folds, and two inner folds. Every two-arm property cell samples a proportion and
declares an outcome support of 0 to 1. The two multi-arm cells sample the binary three-arm law.
property-selection.csv records the cross-validated index and the final index of every lasso
and learners property fit.
Accuracy against known truth#
law |
estimand |
what was tested |
implementation |
bias (99% interval) |
coverage |
SE ratio |
result |
|---|---|---|---|---|---|---|---|
binary-outcome law, lasso candidate sequence |
|
average treatment effect |
|
-0.0032 to 0.0034 |
0.9237 |
0.9051 |
fail |
binary-outcome law, four declared lasso learners |
|
average treatment effect |
|
-0.0032 to 0.0027 |
0.9500 |
0.9945 |
pass |
Agreement with the canonical implementation#
Python property evidence, with comparator runs pending. The R ctmle runs are not registered
yet, so the committed equivalence.csv has no rows. The replay gates above read R’s output, and
they run when a later change registers the R runs.
Theory properties#
property |
cell |
role |
what was tested |
what must hold |
measured |
result |
|---|---|---|---|---|---|---|
|
|
control |
the lasso sequence with a constant outcome regression, so both nuisances are misspecified |
bias interval must fall entirely outside the margin |
bias 0.0432 to 0.0446, margin 0.0024, SE ratio 1.2533 |
pass |
|
|
control |
the declared learners with a constant outcome regression, so both nuisances are misspecified |
bias interval must fall entirely outside the margin |
bias 0.0433 to 0.0448, margin 0.0025, SE ratio 1.2155 |
pass |
|
|
positive |
only the outcome regression is correct, and no lasso candidate is a correct mechanism |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.000664 to 0.000605, margin 0.0021, SE ratio 0.9559 |
pass |
|
|
positive |
only the treatment mechanism is correct, and the lasso path contains it |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.000666 to 0.000248, margin 0.0015, SE ratio 1.2702 |
pass |
|
|
positive |
only the outcome regression is correct, and no declared learner is a correct mechanism |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.0012 to 0.000072, margin 0.0021, SE ratio 0.9377 |
pass |
|
|
positive |
only the treatment mechanism is correct, and the terminal learner specifies it |
bias interval inside the equivalence margin, with the reported standard error on the scale of the empirical spread |
bias -0.000663 to 0.000279, margin 0.0016, SE ratio 1.2149 |
pass |
|
|
control |
the selector is forced to stop at an empty path on the three-arm law |
bias interval must fall entirely outside the margin |
bias 0.0692 to 0.0729, margin 0.0062 |
pass |
|
|
positive |
the lasso sequence on the three-arm law, with a constant outcome regression |
bias interval inside the equivalence margin |
bias -0.0034 to 0.000487, margin 0.0065 |
pass |
|
|
control |
the selector is forced to stop at an empty path |
bias interval must fall entirely outside the margin |
bias 0.0494 to 0.0511, margin 0.0023 |
pass |
|
|
positive |
the selector chooses its own penalty along the lasso sequence |
bias interval inside the equivalence margin, and RMSE at most the declared ratio of the paired control’s |
bias -0.0025 to -0.000412, margin 0.0028, RMSE ratio 0.2205, 99% upper 0.2333 |
pass |
|
|
positive |
the selector chooses its own learner along the declared nested sequence |
bias interval inside the equivalence margin, a declared expected red, and RMSE at most the declared ratio of the paired control’s |
bias 0.0029 to 0.0051, margin 0.0031, RMSE ratio 0.2542, 99% upper 0.2721 |
fail |
Measured values#
quantity |
value |
source |
|---|---|---|
|
800 |
replications per scenario |
|
2000 |
observations per replication |
|
2 |
package truth tests |
|
1 |
package truth tests passing |
|
11 |
repeated-sampling property cells |
|
8 |
property cells passing |
|
0.3246 |
the declared expected red bias, in empirical standard deviations |
|
0.2721 |
the bootstrap 99% upper bound of its RMSE ratio, the discriminating gate |
|
0.9487 |
its coverage of the plug-in diagnostic interval |
|
0.2333 |
the same bound for the lasso sequence |
|
0.0076 |
largest absolute standardized bias of a package truth row |
|
0.9237 |
lowest coverage of a package truth row |
|
0.9900 |
Monte Carlo confidence level |
|
0.0500 |
nominal estimator size |
|
0.9500 |
nominal estimator coverage |
|
10000 |
resamples for bootstrap intervals |
|
0.2500 |
bias equivalence margin in empirical SDs |
|
0.9000 |
lower coverage gate |
|
0.9900 |
reported conservative-coverage ceiling |
|
0.8000 |
lower SE-ratio screen |
|
1.2000 |
upper SE-ratio screen |
|
0.9300 |
lower calibration band |
|
1.0700 |
upper calibration band |
|
0.9200 |
lower calibration-coverage band |
|
0.9800 |
upper calibration-coverage band |
|
0.1000 |
largest supported type-I rate |
|
0.1500 |
paired similarity margin in empirical SDs |
|
1.1000 |
RMSE-ratio non-inferiority margin |
|
-0.0250 |
coverage-difference non-inferiority margin |
|
0.0500 |
SE-calibration non-inferiority margin |
|
0.8000 |
lower power gate |
|
-0.5000 |
root-n contraction target |
|
-0.6250 |
lower contraction band |
|
-0.3750 |
upper contraction band |
|
-0.2500 |
slower rate the interval must exclude |
|
0.5000 |
required bound on each collaborative-to-control RMSE ratio |
|
0.1000 |
union-model SE-ratio screen, lower limit |
|
10 |
union-model SE-ratio screen, upper limit |
Declared design#
The values in this table are declared before the run.
setting |
value |
source |
|---|---|---|
paired role |
descriptive, when the R runs are registered |
the record’s comment in |
replay tolerance |
\(10^{-6}\) |
|
replay counts |
400 unflagged replicates per scenario, 100 final-step comparisons for |
|
selector RMSE ratio |
0.50, applied to the paired bootstrap 99% upper bound of each ratio |
|
property grid |
11 penalties and the penalty 0 |
|
red-cell owners |
F18 for every coverage or standard-error-ratio red cell, and for every |
|
expected red rows |
the |
|
expected adapter rate |
close to every |
the fixture README, “Expected adapter rate” |
learners candidates of the property cells |
a main-terms logistic regression on |
|
Limitations#
The red-cell ledger lists each red cell of a study with the roadmap ask that owns it. Every red row of this study is a declared expected red.
limitation |
what it means for use |
|---|---|
The R comparison is pending |
The page holds Python property evidence, with comparator runs pending. No paired row and no replay gate is evidence yet |
The |
Coverage is 0.92375 and the SE ratio 0.905. Plain TMLE with the same learners and bounds on the same 800 samples covers 0.9225 with an SE ratio of 0.913. The final step reports the penalty 0 on 771 of 800 fits. The cause is the plug-in variance under near-positivity, not the selection, and the row does not test \(\Delta(P_1)\) of F18 ( |
The first run’s necessity cell was a design defect |
The first run declared |
R refits on every row inside each fold |
R refits the fluctuation on every row, and its evaluation refits the lasso path on every row. |
R penalizes its construction |
R adds \(\operatorname{var}(D^*)\) to each construction score, whatever |
A green coverage or SE-ratio row says nothing about F18 |
Where the outcome model is correct, Ju et al. (2018) Lemma 2 gives \(\Delta(P_1) = 0\), so coverage holds conditionally on the outcome fit and its limit, which F18’s reopening condition excludes. Where the outcome model is wrong, one law’s coverage bounds no remainder term |
The multi-arm lasso cell tests the unpenalized end of the path |
The cell reported that end on every smoke seed. It does not test interior selection at three arms |
The lasso final step returns to the unpenalized end on most fits |
On these laws the lasso estimate and plain TMLE are close in distribution. The replay gates, not the truth gates, show that the sequence is built as R builds it. The |
The parity claim is narrow |
It covers binary, two-arm, complete-outcome, GLM-outcome, non-cross-fitted ATE estimation only |
Reproduction#
The fixture README records the declaration inputs and the regeneration commands.