*! version 1 2024-05-04

Title

yatchew_test -- Yatchew (1997), de Chaisemartin and D'Haultfoeuille (2024) linearity test.

Syntax

yatchew_test Y D [if]
[,
het_robust
order(#)
path_plot]

Description

This program implements a non-parametric test that
the expectation of Y given D is linear.
The program implements both the original test proposed
by Yatchew (1997) and its heteroskedasticity-robust version proposed
by de Chaisemartin and D'Haultfoeuille (2024).
In the vignettes linked below, we sketch the intuition behind the two tests, as
to motivate the use of the package and its options.
Please refer to Yatchew (1997) and
Section 3 of de Chaisemartin and D'Haultfoeuille (2024) for further details.

Yatchew (1997) proposes a useful extension of the test
with multiple independent variables.
The program implements this extension when the D
argument has more than one varnames.
It should be noted that the power and consistency of
the test in the multivariate case are not backed by proven
theoretical results. We implemented this extension to allow
for testing and exploratory research.
Future theoretical exploration of the multivariate test will depend on the demand and usage of the package.

Vignettes

Univariate Yatchew Test

Multivariate Yatchew Test

Options

het_robust
By default, the test is performed under the assumption
of homoskedasticity (Yatchew, 1997).
If this option is specified, the test
is performed using the heteroskedasticity-robust
test statistic proposed by de Chaisemartin and D'Haultfoeuille (2024).

order(#)
If this option is specified, the program tests
whether the conditional expectation of Y given D is
a #-degree polynomial in D.
With order(0), the command tests
the hypothesis that the conditional mean of Y
given D is constant.

path_plot
This option can be used only with exactly two varnames
as the D argument. In this case, the program will produce
a plot of the sequence of (D_1i, D_2i) that minimizes the euclidean
distance between each pair of consecutive observations
(see the Multivariate Yatchew Test vignette for further details).

Examples

clear

set seed 0

set obs 200

gen D = uniform()

gen D1 = uniform()

gen Y = 1 + D + D1^2

yatchew_test Y D

yatchew_test Y D1, het_robust

yatchew_test Y D D1, path_plot

Saved results

r(results): Matrix with program results.

References

de Chaisemartin, C, D'Haultfoeuille, X (2024).
Two-way Fixed Effects and Difference-in-Difference Estimators in Heterogeneous Adoption Designs.

Yatchew, A (1997).
An elementary estimator of the partial linear model.

Authors

Clément de Chaisemartin, Economics Department, Sciences Po, France.

Xavier D'Haultfoeuille, CREST-ENSAE, France.

Diego Ciccia, Economics Department, Sciences Po, France.

Felix Knau, Economics Department, Sciences Po, France.

Doulo Sow, CREST-ENSAE, France.

Contact

If you wish to inquire about the functionalities of this package or to report bugs/suggestions, feel free to post your question in the Issue section of the yatchew_test GitHub repository.

Acknowledgement

The development of this package was funded by the European Union (ERC, REALLYCREDIBLE,GA N°101043899).