Learn R Programming

did (version 2.5.0)

ggdid: Plot did objects using ggplot2

Description

Function to plot objects from the did package

Usage

ggdid(object, ...)

Arguments

object

either a MP object or AGGTEobj object. See help(ggdid.MP) and help(ggdid.AGGTEobj).

...

other arguments

Examples

Run this code
if (FALSE) {
data(mpdta)
out <- att_gt(yname = "lemp",
              gname = "first.treat",
              idname = "countyreal",
              tname = "year",
              xformla = ~1,
              data = mpdta)

# plot all group-time average treatment effects
ggdid(out)

# plot event study aggregation
es <- aggte(out, type = "dynamic")
ggdid(es)
}

Run the code above in your browser using DataLab