Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d844d8e
cosmetics
thomaswiemann Feb 19, 2026
5b6ce6d
refactor subsampling functions
thomaswiemann Feb 23, 2026
6305a74
parallelized crossfitting
thomaswiemann Feb 23, 2026
12f3b5d
Merge pull request #81 from thomaswiemann/dev-parallel
thomaswiemann Feb 23, 2026
bf8b6d9
refactor inference, support broom+texreg
thomaswiemann Feb 23, 2026
a029e7f
remove texreg, update tidy tests
thomaswiemann Feb 24, 2026
b8b4d17
validate inputs, closing #8
thomaswiemann Feb 24, 2026
b1c4be6
cvc+diagnostics, fix vignettes
thomaswiemann Feb 24, 2026
aeb961f
migrate to what, deprecate fun
thomaswiemann Feb 26, 2026
f32f1e8
cross-fitted predictions pass-through
thomaswiemann Mar 1, 2026
f6bc32f
fix tests, sub 5sec examples
thomaswiemann Mar 1, 2026
8bb89fd
update docs + pkgdown
thomaswiemann Mar 1, 2026
bd6cfbb
resampling, median/mean aggregation
thomaswiemann Mar 3, 2026
fea1899
cleanup aggregation + new vignettes
thomaswiemann Mar 5, 2026
8d289c2
news + adds JEL ref
thomaswiemann Mar 5, 2026
ce12b8f
refactor ddml_* estimators
thomaswiemann Mar 6, 2026
d692817
Update _pkgdown.yml
thomaswiemann Mar 6, 2026
9cbd8af
bump version to 0.9
thomaswiemann Mar 6, 2026
5afc56d
median agg in spectral norm
thomaswiemann Mar 6, 2026
0e6c4fb
inference + spectral agg + renamed cf/cv
thomaswiemann Mar 9, 2026
dac4d5c
removes Z passthrough
thomaswiemann Mar 9, 2026
eac91f9
doc improvements + cosmetics
thomaswiemann Mar 9, 2026
6ec6a7d
fix cvxr
thomaswiemann Mar 9, 2026
78ae3ab
ddml constructor + docs + cvc fixes + new splits
thomaswiemann Mar 10, 2026
cd5e88d
new fitted + refactor help funs
thomaswiemann Mar 10, 2026
09213b6
simplify ate, late
thomaswiemann Mar 10, 2026
35ffcfa
refactor crossfit internals
thomaswiemann Mar 10, 2026
5231538
update docs + vignettes + tests
thomaswiemann Mar 10, 2026
9f13c25
another cvxr fix
thomaswiemann Mar 10, 2026
0e74c43
Update NEWS.md
thomaswiemann Mar 10, 2026
9bee8c3
multiplier boot+ lin combinations
thomaswiemann Mar 19, 2026
7a67448
if-based inference
thomaswiemann Mar 20, 2026
e9ac868
introduce ral object to unify inference
thomaswiemann Mar 20, 2026
5571b7a
diff-in-diff support
thomaswiemann Mar 22, 2026
5735abb
full-sample scores for attgt
thomaswiemann Mar 23, 2026
33fec9b
updated docs & tests
thomaswiemann Mar 23, 2026
215eab4
vignette updates
thomaswiemann Mar 23, 2026
352d582
diff-in-diff support + inference overhaul
thomaswiemann Mar 23, 2026
edd6a88
multi ensemble tidy + docs + cvc vectorization
thomaswiemann Mar 26, 2026
228197f
news + docs + mdl_Glm renamed
thomaswiemann Mar 26, 2026
62e0ebc
update news
thomaswiemann Mar 27, 2026
ac4fa0a
help_function cleanup
thomaswiemann Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@
^CRAN-SUBMISSION$
^debugging$
^debugger$
^\.cursor$
^\.discussion$
^\.discussions$
^GEMINI\.md$
^README.html$
^R/ddml_to_did\.R$
^tests/testthat/test-ddml_to_did\.R$
7 changes: 2 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,10 @@ jobs:
#r-version: '4.1.0'
use-public-rspm: true

## FIX??
#- name: Install lme4
# run: Rscript -e "install.packages('lme4')"

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::., cran/lme4@1.1-35
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
Expand All @@ -44,7 +41,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ inst/doc
.direnv
/debugging/
/debugger
.cursor/
.discussion/
.discussions/
GEMINI.md
README.html
R/ddml_to_did.R
tests/testthat/test-ddml_to_did.R
23 changes: 14 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ddml
Title: Double/Debiased Machine Learning
Version: 0.3.1
Date: 2025-12-10
Version: 0.9.0
Date: 2026-03-06
Authors@R: c(
person("Achim", "Ahrens", role = "aut"),
person("Christian B", "Hansen", role = "aut"),
Expand All @@ -23,21 +23,26 @@ RoxygenNote: 7.3.3
Depends:
R (>= 4.3)
Imports:
methods,
stats,
AER,
generics,
glmnet,
graphics,
MASS,
Matrix,
methods,
nnls,
pbapply,
quadprog,
glmnet,
ranger,
stats,
xgboost
Suggests:
sandwich,
AER,
covr,
testthat (>= 3.0.0),
CVXR,
knitr,
rmarkdown
parallel,
rmarkdown,
sandwich,
testthat (>= 3.0.0)
Config/testthat/edition: 3
VignetteBuilder: knitr
78 changes: 66 additions & 12 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,34 +1,88 @@
# Generated by roxygen2: do not edit by hand

S3method("[",summary.ddml)
S3method("[[",ral_rep)
S3method(as.list,ddml)
S3method(as.list,ddml_rep)
S3method(as.list,ral)
S3method(as.list,ral_rep)
S3method(coef,ral)
S3method(coef,ral_rep)
S3method(confint,ral)
S3method(confint,ral_rep)
S3method(glance,ddml)
S3method(glance,ddml_rep)
S3method(glance,ral)
S3method(glance,ral_rep)
S3method(hatvalues,ral)
S3method(length,ral_rep)
S3method(lincom,ddml)
S3method(lincom,ddml_rep)
S3method(nobs,ral)
S3method(nobs,ral_rep)
S3method(plot,ral)
S3method(plot,ral_rep)
S3method(predict,ensemble)
S3method(predict,mdl_bigGlm)
S3method(predict,mdl_glm)
S3method(predict,mdl_glmnet)
S3method(predict,mdl_ranger)
S3method(predict,mdl_xgboost)
S3method(predict,ols)
S3method(print,summary.ddml_ate)
S3method(print,summary.ddml_att)
S3method(print,summary.ddml_fpliv)
S3method(print,summary.ddml_late)
S3method(print,summary.ddml_pliv)
S3method(print,summary.ddml_plm)
S3method(summary,ddml_ate)
S3method(summary,ddml_att)
S3method(summary,ddml_fpliv)
S3method(summary,ddml_late)
S3method(summary,ddml_pliv)
S3method(summary,ddml_plm)
S3method(print,ddml_diagnostics)
S3method(print,ddml_rep)
S3method(print,lincom)
S3method(print,lincom_rep)
S3method(print,ral_rep)
S3method(print,summary.ddml)
S3method(print,summary.ddml_rep)
S3method(print,summary.ral)
S3method(print,summary.ral_rep)
S3method(summary,ddml)
S3method(summary,ddml_rep)
S3method(summary,ral)
S3method(summary,ral_rep)
S3method(tidy,ddml)
S3method(tidy,ddml_diagnostics)
S3method(tidy,ddml_rep)
S3method(tidy,ral)
S3method(tidy,ral_rep)
S3method(vcov,ral)
S3method(vcov,ral_rep)
export(crosspred)
export(crossval)
export(ddml)
export(ddml_apo)
export(ddml_ate)
export(ddml_att)
export(ddml_attgt)
export(ddml_fpliv)
export(ddml_late)
export(ddml_pliv)
export(ddml_plm)
export(ddml_rep)
export(ddml_replicate)
export(diagnostics)
export(ensemble)
export(ensemble_weights)
export(glance)
export(lincom)
export(lincom_weights_did)
export(mdl_bigGlm)
export(mdl_glm)
export(mdl_glmnet)
export(mdl_ranger)
export(mdl_xgboost)
export(ols)
export(ral)
export(ral_rep)
export(shortstacking)
export(tidy)
importFrom(generics,glance)
importFrom(generics,tidy)
importFrom(graphics,plot)
importFrom(stats,coef)
importFrom(stats,confint)
importFrom(stats,hatvalues)
importFrom(stats,nobs)
importFrom(stats,vcov)
27 changes: 21 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# ddml 0.3.1

* Updates internals of ``ddml::mdl_xgboost()`` with new ``xgboost`` syntax.
* Fixes ``ddml::ddml_fpliv()`` with custom weights.
* Allows for stacking with no positive stacking weights.
* Fixes ``ddml::mdl_glmnet`` predictions for binomial regression.
# ddml 0.9.0

* Adds `ddml_attgt()` for staggered DiD and `ddml_apo()` for average potential outcomes.
* Adds `ddml()` constructor for custom DML estimators with user-supplied scores.
* Adds `lincom()` and `lincom_weights_did()` for inference on linear combinations.
* Influence-function-based inference via the `ral` class; all estimators now inherit from `ral`.
* Adds `ddml_rep()` and `ddml_replicate()` for repeated cross-fitting with median, mean, or spectral-norm aggregation.
* Adds `diagnostics()` for MSPE, R-squared, stacking weights, and CVC tests.
* Adds `fitted`/`splits` pass-through to all `ddml_*()` estimators.
* New S3 methods: `plot()`, `as.list()`, `hatvalues()`, `nobs()`, multi-ensemble `tidy()`/`glance()`.
* Adds uniform confidence bands via multiplier bootstrap (`confint(uniform = TRUE)`).
* Adds HC0/HC3 variance estimators, parallel computation, stratified cross-fitting, cluster-aware splitting, and input validation.
* Adds `broom` compatibility.
* Fixes `ddml_fpliv()` with custom weights.
* Breaking changes:
- Inference internals use `$inf_func` instead of `$scores`/`$J`/`$psi_a`/`$psi_b`.
- Utility functions (`crosspred`, `crossval`, `ensemble`, `ensemble_weights`, `shortstacking`) no longer accept `Z`/`newZ`. Pre-concatenate instruments with covariates (e.g., `cbind(X, Z)`).
- `crosspred()` and `shortstacking()` drop `compute_insample_predictions` and `insample_fitted` output.
- `ddml_fpliv()` drops the `enforce_LIE` argument.
- `shortstacking()` drops `shortstack_y`.
- `ddml_*()` estimators drop `subsamples`, `cv_subsamples`, `subsamples_byD`, `cv_subsamples_byD`. Use the new `splits` parameter instead.

# ddml 0.3.0

Expand Down
4 changes: 2 additions & 2 deletions R/AE98.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Random subsample from the data of Angrist & Evans (1991).
#' Random Subsample from the Data of Angrist & Evans (1998)
#'
#' @description Random subsample from the data of Angrist & Evans (1991).
#' @description Random subsample from the data of Angrist & Evans (1998).
#'
#' @format A data frame with 5,000 rows and 13 variables.
#' \describe{
Expand Down
Loading
Loading