nt-williams / lmtp

:package: Non-parametric Causal Effects Based on Modified Treatment Policies :crystal_ball:
http://www.beyondtheate.com
GNU Affero General Public License v3.0
57 stars 17 forks source link

Weights not used in standard error calculation #134

Closed kathoffman closed 3 months ago

kathoffman commented 5 months ago

Hi @nt-williams, I believe the standard errors when weights are given are not currently incorporating the weights, see theta.R, line 94.

se <- sqrt(var(vapply(clusters, function(x) mean(x), 1)) / j)

https://github.com/nt-williams/lmtp/blob/master/R/theta.R#L94

nt-williams commented 5 months ago

Thanks! Fixed in devel with commit 13faf4f