naoki-egami / DIDdesign

R package DIDdesign: Analyzing Difference-in-Differences Design
GNU General Public License v2.0
35 stars 7 forks source link

did_plot seems not working for RCS data #5

Closed naoki-egami closed 5 years ago

naoki-egami commented 5 years ago

@sou412 did_plot produces errors on "id_time" and some others in the following part.

data %>% group_by(treatment, id_time) %>% summarise(ymean = mean(outcome, na.rm = TRUE)) -> y_summary y1mean <- y_summary %>% filter(treatment == 1) %>% pul(ymean) y0mean <- y_summary %>% filter(treatment == 0) %>% pul(ymean)

I prepared more entire code that reproduces the error. code in double_did

sou412 commented 5 years ago

@naoki-egami there was a typo in the code, pul() should have been pull(). Also fixed confusion between variable and variable name in the package. it should be producing a plot now.