------------------------------------------------------------------------------- help fordflJoao Pedro Azevedo -------------------------------------------------------------------------------

DiNardo, Fortin and Lemieux Counterfacual Kernel Density

dfldepvarindepvars[ifexp] [inrange],outcome(varname)[group(varname)min(integer)max(integer)nbins(integer)w(bandwidth)step(varlist)adaptivegaussepanoaxacaquietlyprobitnxvar(string)ncfactual(string)nufactual(string)nfactual(string)graph_combineaxis_selection_optionsaxis_scale_optionstitle_optionsnogrouptname3(string)]

Description

dflestimates DiNardo, Fortin and Lemieux Counterfacual Kernel Densities. Treatment status is identified by depvar==1 for the treated and depvar==0 for the untreated observations.The propensity score - the conditional treatment probability - is estimated by the program on the indepvars.

outcomevariable has to be specified.

dflalso support graph options such asgraph_combine,title_optionsandaxis_selection_options.Several different weight can be used on this procedure. In this ado we use the following weight. Weight=1-Prob(Depvar=1)/Prob(Depvar=0).

Options

groupthe group variable.

graphcfactual (compares the (Depvar=0) distribution to the (Depvar=0) distribution that would have prevailed if they had been paid like (Depvar=1)) , ufactual (compares the (Depvar=1) distribution to the counterfactual. These will be different to the extent that the X's of the two groups differ) and diff (difference between the how (Depvar=0) distribution that would have prevailed if they had been paid like (Depvar=1) and (Depvar=1) distribution).

minsets the minimum value. When omiteddfluses the minimum value of the specified outcome.

maxsets the maximum value. When omiteddfluses the maximum value of the specified outcome.

nbinsnumber of equaly spaced intervals.Default value 200.

adaptiveproduces density estimates using adaptive kernel estimation methods. Please note that the method is slower than than the default one.

stepSequential decomposition. This option runs N+1 models (N being the number of variables in the varlist). The first model will consider all variables. Each subsequent model will remove one variable at the time. The final output is a single graph with overlaying kernel density differences for the N+1 models. My impression is that if N>2 the figure gets very clutered.

gaussspecify the kernel (gaussian).

epanspecify the kernel (epanechnikov).

oaxacacompute mean using the estimated density to and compare to the actual mean of log wages or oaxaca wages (the predicted values).

quietlydo not print output of propensity score estimation.

probituse probit instead of the default logit to estimate the propensity score.

nxvarassign a label to the x-axis.

ncfactualassign a label to cfactual.

nfactualassign a label to factual.

nufactualassing a label to ufactual.

nogrouptdrops the group names from the figure.

Examples. webuse nlsw88, clear . g ttl_exp2 = ttl_exp^2 . g lwage = log(wage) . dfl union ttl_exp ttl_exp2 married grade , outcome(lwage) . dfl union ttl_exp ttl_exp2 married grade , outcome(lwage) w(.05) . dfl union ttl_exp ttl_exp2 married grade , outcome(lwage) adaptive . dfl union ttl_exp ttl_exp2 married grade , outcome(lwage) step(tenure collgrad)

References

DiNardo, J., N.M. Fortin, and T.Lemieux (1996) "Labour Market Insitutions and the Distribution of Wages, 1973-1992: A Semiparametric Approach,"

Econometrica, 64(5): 1001-1044.Van Kerm, P. (2003) "Adaptive kernel density estimation."

The StataJournal, 3(2): 148-156.

AuthorJoao Pedro Azevedo, World Bank, jazevedo@worldbank.org

AknowledgementsThis ado uses part of the code written by John DiNardo. I would like to thank some Stata users who have made comments to an earlier release of this ado, in particular Jean Ries. The usual disclaimer applies.

Also seeManual:

[R] kdensityOnline: help for kdensity and help for akdensity and decompose and jmp if installed.