Stata Command: dkdensity.ado
The "deconvolution" identifies the distribution of Xi even if Xi is not observed, but with two measurements X1i and X2i of Xi with measurement errors e1i = X1i - Xi and e2i = X2i - Xi, respectively. The graph below depicts a deconvolution kernel density estimate for the distribution of total factor productivity (TFP), ω1982,i, of Chilean firms in the food industry in 1982 along with its 95% uniform confidence band (Kato and Sasaki, 2018). The residuals of production functions in 1982 and 1983 are r1982,i = ω1982,i + ε1982,i. and r1983,i = ω1983,i + ε1983,i = ω1982,i + η1983,i + ε1983,i, where ω denotes productivity, η denotes a productivity shock, and ε denotes an idiosyncratic shock. Therefore, X1i = r1982,i and X2i = r1983,i serve as repeated measurement for Xi = ω1982,i with measurement errors, e1i = ε1982,i and e2i = η1983,i + ε1983,i, respectively. The graph is automatically produced by the Stata command dkdensity as follows:
Installation:
. ssc install dkdensity
Usage:
. use "example_1982_1983.dta"
. dkdensity resid1982 resid1983, numx(100) domain(4)
Help:
. help dkdensity
Reference: Kato, K. and Y. Sasaki (2018) Uniform Confidence Bands in Deconvolution with Unknown Error Distribution. Journal of Econometrics, 207 (1), pp. 129-161. Paper.