Skip to content

Give estimate() a correct standard error and keep bootstrap replicates - #65

Merged
ielbadisy merged 1 commit into
mainfrom
fix-estimate-se
Nov 14, 2026
Merged

ielbadisy merged 1 commit into
mainfrom
fix-estimate-se

Conversation

@ielbadisy

Copy link
Copy Markdown
Owner

The g-computation SE was the spread of the unit-level effects, which ignores uncertainty in the outcome model: for an additive glm it was exactly 0 with a zero-width CI. With model = "glm" the normal interval now uses a delta-method SE of the contrast (plus the sampling variance of the averaged effects for ATE/ATT); it matches the lm SE of the treatment coefficient for a linear model (0.0479 in the reported repro). Other learners, and interval = "bootstrap", use the SD of n_boot nonparametric bootstrap refits. $bootstrap now keeps the replicate estimates and their SD. Tests added.

@ielbadisy
ielbadisy merged commit 0f4377b into main Nov 14, 2026
@ielbadisy
ielbadisy deleted the fix-estimate-se branch November 14, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant