Skip to content

Commit

Permalink
Fix variance computation
Browse files Browse the repository at this point in the history
  • Loading branch information
kazuyanagimoto committed Sep 9, 2024
1 parent 8e6ee8d commit a9ca70e
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 103 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: unitdid
Title: Unit-level Difference-in-Difference Estimator
Version: 0.0.6
Version: 0.0.6.1
Authors@R:
person(given = "Kazuharu",
family = "Yanagimoto",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ New Features:
Bug Fixes:

- `varerr` and `coverr` is not correctly estimated when `k_min` is not 0
- Formula for `varerr` and `coverr` was incorrect (v0.0.6.1)

## 0.0.5

Expand Down
2 changes: 1 addition & 1 deletion R/compute_projection.R
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ altepsilon_ek <- function(data, iname, tname, ename, k_min, e, k) {

mean_epsilon <- data |>
dplyr::filter(!!rlang::sym(ename) + k_min > e + k,
!!rlang::sym(tname) < e + k) |>
!!rlang::sym(tname) < e + k_min) |>
dplyr::summarize(mean_epsilon = stats::weighted.mean(zz000ytilde,
w = zz000w),
.by = !!rlang::sym(iname))
Expand Down
Loading

0 comments on commit a9ca70e

Please sign in to comment.