parallel.trends.plot: Generates plots to diagnose parallel trends for...

Description Usage Arguments Value

View source: R/ptp.R

Description

Generates plots to diagnose parallel trends for difference-in-difference regressions with additional control variables

Usage

1
2
3
4
5
6
parallel.trends.plot(
  pt.dat,
  facet.mode = ".mode" %in% colnames(pt.dat),
  add.exp.line = c("first", "all", "none")[1],
  exp.line.opt = list(color = "black")
)

Arguments

pt.dat

A data frame as returned by the function parallel.trends.data

facet.mode

If TRUE generate a facet plot with one facet for trends of control group and experimental group with and without correction of the control variables

add.exp.line

How shall vertical lines be added to indicate the experimental periods? "first" means a line at the first experimental period, "all" means a line at all experimental periods. Use "none" to add no lines

exp.line.opt

Arguments passed to geom_vert to customize the vertical lines.

Value

A ggplot object


skranz/ParallelTrendsPlot documentation built on Dec. 23, 2021, 3:23 a.m.