Skip to content

Commit 038c974

Browse files
committed
Added CFD balancing
1 parent 76f51e0 commit 038c974

File tree

7 files changed

+1045
-2
lines changed

7 files changed

+1045
-2
lines changed

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
WeightIt News and Updates
22
======
33

4+
# `WeightIt` (development version)
5+
6+
* Added `method = "cfd"` for characteristic function distance balancing as described by [Santra, Chen, and Park (2026)](http://arxiv.org/abs/2601.15449). Energy balancing is a special case of this method.
7+
48
# `WeightIt` 1.5.1
59

610
* `calibrate()` with `method = "isoreg"` can now be used with sampling weights.

R/weightit.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
#' | [`"super"`][method_super] | Propensity score weighting using SuperLearner |
120120
#' | [`"bart"`][method_bart] | Propensity score weighting using Bayesian additive regression trees (BART) |
121121
#' | [`"energy"`][method_energy] | Energy balancing |
122+
#' | [`"cfd"`][method_cfd] | Characteristic function distance balancing |
122123
#'
123124
#' `method` can also be supplied as a user-defined function; see [`method_user`]
124125
#' for instructions and examples. Setting `method = NULL` computes unit weights.

R/weightit2cfd.R

Lines changed: 818 additions & 0 deletions
Large diffs are not rendered by default.

R/weightit_methods.R

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,5 +232,23 @@
232232
density_ok = TRUE,
233233
stabilize_ok = TRUE,
234234
plot.weightit_ok = FALSE
235+
),
236+
"cfd" = list(
237+
treat_type = c("binary", "multinomial"),
238+
estimand = c("ATE", "ATT", "ATC"),
239+
alias = c("cfd", "kernel"),
240+
description = "characteristic function distance balancing",
241+
ps = FALSE,
242+
msm_valid = FALSE,
243+
msm_method_available = FALSE,
244+
subclass_ok = FALSE,
245+
packages_needed = "osqp",
246+
s.weights_ok = TRUE,
247+
missing = "ind",
248+
moments_int_ok = TRUE,
249+
moments_default = 0,
250+
density_ok = FALSE,
251+
stabilize_ok = FALSE,
252+
plot.weightit_ok = FALSE
235253
)
236254
)}

README.Rmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ knitr::opts_chunk$set(
1010
warning = FALSE,
1111
message = FALSE,
1212
tidy = FALSE,
13-
fig.align='center',
13+
fig.align = 'center',
1414
comment = "##",
1515
fig.path = "man/figures/README-"
1616
)
@@ -94,6 +94,7 @@ The tables below contain the available methods in *WeightIt* for estimating weig
9494
SuperLearner PS | [`"super"`](https://ngreifer.github.io/WeightIt/reference/method_super.html)
9595
Bayesian additive regression trees PS | [`"bart"`](https://ngreifer.github.io/WeightIt/reference/method_bart.html)
9696
Energy balancing | [`"energy"`](https://ngreifer.github.io/WeightIt/reference/method_energy.html)
97+
Characteristic function distance balancing | [`"cfd"`](https://ngreifer.github.io/WeightIt/reference/method_cfd.html)
9798

9899
#### Multi-Category Treatments
99100

@@ -109,7 +110,8 @@ The tables below contain the available methods in *WeightIt* for estimating weig
109110
SuperLearner PS | [`"super"`](https://ngreifer.github.io/WeightIt/reference/method_super.html)
110111
Bayesian additive regression trees PS | [`"bart"`](https://ngreifer.github.io/WeightIt/reference/method_bart.html)
111112
Energy balancing | [`"energy"`](https://ngreifer.github.io/WeightIt/reference/method_energy.html)
112-
113+
Characteristic function distance balancing | [`"cfd"`](https://ngreifer.github.io/WeightIt/reference/method_cfd.html)
114+
113115
#### Continuous Treatments
114116

115117
Method | `method`

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ install them.
169169
| SuperLearner PS | [`"super"`](https://ngreifer.github.io/WeightIt/reference/method_super.html) |
170170
| Bayesian additive regression trees PS | [`"bart"`](https://ngreifer.github.io/WeightIt/reference/method_bart.html) |
171171
| Energy balancing | [`"energy"`](https://ngreifer.github.io/WeightIt/reference/method_energy.html) |
172+
| Characteristic function distance balancing | [`"cfd"`](https://ngreifer.github.io/WeightIt/reference/method_cfd.html) |
172173

173174
#### Multi-Category Treatments
174175

@@ -184,6 +185,7 @@ install them.
184185
| SuperLearner PS | [`"super"`](https://ngreifer.github.io/WeightIt/reference/method_super.html) |
185186
| Bayesian additive regression trees PS | [`"bart"`](https://ngreifer.github.io/WeightIt/reference/method_bart.html) |
186187
| Energy balancing | [`"energy"`](https://ngreifer.github.io/WeightIt/reference/method_energy.html) |
188+
| Characteristic function distance balancing | [`"cfd"`](https://ngreifer.github.io/WeightIt/reference/method_cfd.html) |
187189

188190
#### Continuous Treatments
189191

man/method_cfd.Rd

Lines changed: 198 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)