Skip to content

Commit

Permalink
Swapped sunab data to be the same as rest of README
Browse files Browse the repository at this point in the history
  • Loading branch information
mcaceresb committed Mar 27, 2024
1 parent da4e0d6 commit 0b26a20
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,10 @@ First, we import the function we created for extracting the full-variance covari

```{r, cache = TRUE}
# Run fixest with sunab
formula_sunab <- y ~ x1 + sunab(year_treated, year) | id + year
res_sunab <- fixest::feols(formula_sunab, base_stagg)
df$year_treated <- ifelse(is.na(df$yexp2), Inf, df$yexp2)
formula_sunab <- dins ~ sunab(year_treated, year) | stfips + year
res_sunab <- fixest::feols(formula_sunab, cluster="stfips", data=df)
fixest::iplot(res_sunab)
# Extract the beta and vcv
beta_vcv <- sunab_beta_vcv(res_sunab)
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,15 @@ function(sunab_fixest){

``` r
# Run fixest with sunab
formula_sunab <- y ~ x1 + sunab(year_treated, year) | id + year
res_sunab <- fixest::feols(formula_sunab, base_stagg)
df$year_treated <- ifelse(is.na(df$yexp2), Inf, df$yexp2)
formula_sunab <- dins ~ sunab(year_treated, year) | stfips + year
res_sunab <- fixest::feols(formula_sunab, cluster="stfips", data=df)
fixest::iplot(res_sunab)
```

![](README_files/figure-gfm/unnamed-chunk-10-1.png)<!-- -->

``` r
# Extract the beta and vcv
beta_vcv <- sunab_beta_vcv(res_sunab)

Expand Down Expand Up @@ -442,7 +448,7 @@ HonestDiD::createSensitivityPlot_relativeMagnitudes(sensitivity_results,
original_results)
```

![](README_files/figure-gfm/unnamed-chunk-10-1.png)<!-- -->
![](README_files/figure-gfm/unnamed-chunk-10-2.png)<!-- -->

### Callaway and Sant’Anna

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified README_files/figure-gfm/unnamed-chunk-10-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added README_files/figure-gfm/unnamed-chunk-10-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b26a20

Please sign in to comment.