Custom plot method for objects of class "fdid_scb"
plot.fdid_scb.RdThis function is an S3 method for plot, specifically designed for objects of class "fdid_scb". It plots the simultaneous confidence bands together with honest reference band for performing honest causal inference.
Usage
# S3 method for class 'fdid_scb'
plot(
object,
ta.ts = NULL,
ta.s = NULL,
ftr.m = NULL,
ref.band.pre = TRUE,
note.pre = TRUE,
note.post = TRUE,
ci.pre = FALSE,
ci.post = FALSE,
pos.legend = "top",
scale.legend = 1,
verbose = TRUE,
...
)Arguments
- object
an object of class
"fdid_scb". The object to be plotted.- ta.ts
a numeric value that indicates the last time point in the pre-anticipation periods. It should be smaller than the reference time period.
- ta.s
a numeric vector of control parameters with length two for deriving the honest reference band under the violation of no-anticipation assumption. If
ta.tsis NULL, the value ofta.sis ignored. Ifta.tsis not NULL, the value ofta.scannot be NULL.- ftr.m
a numeric vector of control parameters with length two for deriving the honest reference band under violation of the parallel trends assumption. The default is NULL.
- ref.band.pre
a logical value. If TRUE, the reference band for pre-anticipation period is also plotted.
- note.pre
a logical value. If TRUE, the note for pre-anticipation period is given on top of plot. If no honest reference band is defined, there is no need to perform validation in the pre-anticipation period, and
note.preis FALSE.- note.post
a logical value. If TRUE, the note for post-treatment period is given on top of plot.
- ci.pre
a logical value. If TRUE, the point-wise confidence intervals for pre-treatment period are plotted.
- ci.post
a logical value. If TRUE, the point-wise confidence intervals for post-treatment period are plotted.
- pos.legend
a character value of "top" or "bottom" that indicates the position of legend. If NULL, the legend is not printed.
- scale.legend
a positive number that defines the size of legend. If
pos.legendis NULL, the value ofscale.legendis ignored.- verbose
a logical value. If TRUE, the uniformly significant time span(s) under your specification will be directly printed out on the console.
- ...
Additional arguments to be passed to plot.
Value
The function returns a plot with simultaneous confidence bands for event study coefficients in a functional framework, together with the honest reference band for honest inference, if properly defined.
References
Fang, C. and Liebl, D. (2026). Making Event Study Plots Honest: A Functional Data Approach to Causal Inference. arXiv:2512.06804.
Examples
data(LWdata)
fdid_scb_est <- fdid_scb(beta=LWdata$beta, cov=LWdata$cov, t0=LWdata$t0)
cat("The reference time is ", LWdata$t0, ". If not NULL, the input 'ta.ts' in function 'plot' should be smaller than this value.", sep="")
#> The reference time is -2. If not NULL, the input 'ta.ts' in function 'plot' should be smaller than this value.
## simultaneous inference
par(cex.axis = 1.4, cex.lab = 1.4, cex.main = 1.4)
plot(fdid_scb_est, scale.legend=1.4)
#> Uniformly and Negatively Significant Time Span: [ -1 , 0.5391115 ]
#> Uniformly and Negatively Significant Time Span: [ 0.5391115 , 1.485582 ]
#> Uniformly and Negatively Significant Time Span: [ 9.603963 , 9.929641 ]
#> Uniformly and Negatively Significant Time Span: [ 10.03959 , 10.44117 ]
#> Uniformly and Negatively Significant Time Span: [ 11.01236 , 21 ]
title(ylab="Effects of Duty-to-Bargain Laws")
## honest inference under treatment anticipation
plot(fdid_scb_est, ta.ts=-3, ta.s=c(0.5,0.5), scale.legend=1.4)
#> Uniformly and Negatively Significant Time Span: [ 0.3430608 , 1.980728 ]
#> Uniformly and Negatively Significant Time Span: [ 3.395558 , 3.942929 ]
#> Uniformly and Negatively Significant Time Span: [ 6.583647 , 7.128474 ]
#> Uniformly and Negatively Significant Time Span: [ 8.894443 , 21 ]
title(ylab="Effects of Duty-to-Bargain Laws")
## honest inference under violation of parallel trends assumption
plot(fdid_scb_est, ftr.m=c(0.5,0.5), scale.legend=1.4)
title(ylab="Effects of Duty-to-Bargain Laws")