*! version 3.1.0 July 11 2024
help xteventtest

Title

xteventtest -- Hypothesis Testing after Panel Event Study Estimation

Syntax

xteventtest
,
[options]

Main
coefs(numlist) coefficients to be tested

cumul test sum of coefficients

allpre test all pre-event coefficients

allpost test all post-event coefficients

linpretrend test for a linear pretrend

trend(#1) tests for a linear trend from time period #1 before treatment

constanteff test for constant post-event coefficients

overid test overidentifyng restrictions for pretrends and effects leveling off

overidpre(integer) test overidentifyng restriction for pretrends

overidpost(integer) test overidentifyng restriction for effects leveling off

testopts(string) options to be passed to test

Description

xteventtest tests common hypotheses after xtevent.

Options

Main

coefs(numlist) specifies a numeric list of event-times to be tested. These are tested to be equal to 0 jointly, unless otherwise requested in testopts().

cumul requests a test of equality to 0 for the sum of every coefficient for each event-time in coefs().

allpre tests that all pre-event coefficients are equal to 0. With cumul, it tests that the sum of all pre-event coefficients is equal to 0.

allpost tests that all post-event coefficients are equal to 0. With cumul, it tests that the sum of all post-event coefficients is equal to 0.

linpretrend requests a specification test to see if the coefficients follow a linear trend before the event.

trend(#1) tests for a linear trend from time period #1 before the policy change. It uses xtevent, trend(#1, method(ols)) to estimate the trend. #1 must be less than -1.

constanteff tests that all post-event coefficients are equal.

overid tests overidentifying restrictions: a test for pre-trends and a test for events leveling-off. The periods to be tested are those
used in the xtevent call. See xtevent.

overidpre(#1) tests the pre-trends overidentifying restriction. It tests that the coefficients for the earliest #1 periods before the event
are equal to 0, including the endpoints. For example, with a window of 3, overidpre(2) tests that the coefficients for event-times -4+
(the endpoint) and -3 are jointly equal to 0. #1 must be greater than 0.

overidpost(#1) tests the effects leveling off overidentifying restriction. It tests that the coefficients for the latest #1 periods after
the event are equal, including the endpoints. For example, with a window of 3, overidpost(3) tests that the coefficients for event-times
4+ (the endpoint), 3, and 2 are equal to each other. #1 must be greater than 1.

testopts(string) specifies options to be passed to test. See test.

Examples

Setup

. webuse nlswork

. xtset idcode year

Basic event study with clustered standard errors
Impute policy variable assuming no unobserved changes

. xtevent ln_w age c.age#c.age ttl_exp c.ttl_exp#c.ttl_exp tenure , pol(union) w(3) cluster(idcode) impute(nuchange)

Test some coefficients to be equal to 0 jointly

. xteventtest, coefs(1 2)

Test that all pre-event coefficients are equal to 0

. xteventtest, allpre

Test that the sum of all pre-event coefficients is equal to 0

. xteventtest, allpre cumul

Test whether the coefficients before the event follow a linear trend

. xteventtest, linpretrend

Tests that the coefficients for the earliest 2 periods before the event are equal to 0

. xteventtest, overidpre(2)

Saved Results

xteventtest stores the following in r():

Scalars

r(p) two-sided p-value

r(F) F statistic

r(df) test constraints degrees of freedom

r(df_r) residual degrees of freedom

r(dropped_i) index of ith constraint dropped

r(chi2) chi-squared

r(drop) 1 if constraints were dropped, 0 otherwise

Macros

r(mtmethod) method of adjustment for multiple testing. This macro is inherited from test

Matrices

r(mtest) multiple test results. This matrix is inherited from test

Authors

Simon Freyaldenhoven, Federal Reserve Bank of Philadelphia.

simon.freyaldenhoven@phil.frb.org

Christian Hansen, University of Chicago, Booth School of Business.

chansen1@chicagobooth.edu

Jorge Pérez Pérez, Banco de México.

jorgepp@banxico.org.mx

Jesse Shapiro, Brown University.

jesse_shapiro_1@brown.edu

Support

For support and to report bugs please email Jorge Pérez Pérez, Banco de México.

jorgepp@banxico.org.mx

xtevent can also be found on GitHub.