*! version 1.1.1

Title

dkdensity -- Executes deconvolution kernel density estimation and a construction of its uniform confidence band.

Syntax

dkdensity
x1
x2
[if] [in]
[, numx(real) domain(real) cover(real) tp(real)]

Description

dkdensity executes deconvolution kernel density estimation and a construction of its uniform confidence band based on
Kato and Sasaki (2018).
The command requires as input two measurements, x1 and x2, of the unobserved latent variable x with classical measurement errors, e1 = x1 - x and e2 = x2 - x, respectively. The output consists of a deconvolution kernel density estimate of f(x) and their uniform confidence band over a domain of x.

Options

numx(real) sets the number of grid points of x for deconvolution kernel density estimation and its uniform confidence band. The default value is numx(20).

domain(real) sets the domain of deconvolution kernel density estimation and its uniform confidence band. The default value domain(2) defines the domain as +/- 2 standard deviations of x.

cover(real) sets the nominal uniform coverage probability for the uniform confidence band. The default value cover(0.95) constructs a 95% uniform confidence band.

tp(real) sets the scale-normalized tuning parameter. The default value is tp(0.2).

Examples

Total factor productivity of individual firms in Chile (x1982 first measurement of x, x1983 second measurement of x)

Constructing a uniform confidence band in the domain corresponding to +/- 4 standard deviations of x:

. use "example_1982_1983.dta"

. dkdensity x1982 x1983, numx(100) domain(4)

Construction of a 90% uniform confidence band:

. use "example_1982_1983.dta"

. dkdensity x1982 x1983, numx(100) domain(4) cover(0.90)

Stored results

dkdensity stores the following in e():

Scalars

r(N) observations

Macros

r(cmd) dkdensity

Matrices

r(x) vector of x

r(fx) vector of density values

r(lower) confidence band (lower boundary)

r(upper) confidence band (upper boundary)

Reference

Kato, K. and Y. Sasaki. 2018. Uniform Confidence Bands in Deconvolution with Unknown Error Distribution. Journal of Econometrics, 207 (1), pp. 129-161.
Link to Paper.

Authors

Kengo Kato, Cornell University, Ithaca, NY.

Yuya Sasaki, Vanderbilt University, Nashville, TN.