Presentation is loading. Please wait.

Presentation is loading. Please wait.

1st. STATA Group Meeting Mexico

Similar presentations


Presentation on theme: "1st. STATA Group Meeting Mexico"— Presentation transcript:

1 1st. STATA Group Meeting Mexico
Discussion of user-written Stata programs Predicting counterfactual densities with the DFL Ado-file: A pertinent constructive critique. Luis Huesca Reynoso Centro de Investigación en Alimentación y Desarrollo, A.C. Department of Economics. April 23, 2009, Universidad Iberoamericana Campus Mexico.

2 It is not an easy task dealing with distributions (and so with densities!)
Problems to face: Scale: log or numeric. Comparisson: Unit of measurement (in economics and social sciencies: constant prices, others. Selection of the right window width (eye-ball sight or the optimal) –check out for instance bandw by Salgado-Ugarte, Shimizu and Taniuchi- Joint: Compute them toghether (see for instance nbins or # of grid points in akdensity). STATA makes it easier! Goal.- The estimation of kernel density functions and counterfactuals well dimensioned with a semiparametric technique: Estimate densities that stands for obtaining the real shape not only for the total distribution but also for a number of subgroups belonging to the former.

3 Probability density function (PDF)
Any function, f(y) can serve as a density function as long as: and A general kernel function K(u) to weight the density must then be, Since then By definition, the sum of the PDF must add to one as so for the Gaussian or any other nice kernel functions (Duclos, 2001 & Silverman, 1986) –Epanechnikov, biweight , triangular, cosine kernels for instance-.

4 Following Jenkins and Van Kerm, (2005) for decompositions:
Kernel density estimation: Letting the data speak by themselves as follows: With as a vector of earnings, h the optimal window width and K a Gaussian kernel function. Following Jenkins and Van Kerm, (2005) for decompositions: as a weigthed sum of the FDPs for each sub-group k, where stands for the population share of the group k, and as the PDF of the group k. - In the empirical example an adaptive kernel estimator is used (Van Kerm, 2003).

5 Dinardo, Fortin, Lemiux (1996)
Counterfactual estimation compares the objective variable (depvar) distribution to the depvar distribution that would have prevailed if they had been paid like the comparison group (the counterpart). Actual wage distributions for A and B Actual Counterfactual DFL (1996) rewrite and reweigh the density for B as follows: In Stata: w = 1-Prob(Depvar=1)/Prob(Depvar=0) Which can be computed using Bayes’ theorem: The conditional treatment probability – propensity score – is estimated by the program under a especification using a logistic regression (DFL command shifts to probit as well). For comparisson I use the pscore ado file written by Becker & Ichino (2002) which follows the neirest neighbour technique.

6 Empirical case: (A semi-parametric-approach)
Estimation of the mexican earnings distribution and decompositions by sub-population of workers in the formal and informal sectors (compliance with social security coverage). (Let’s assume that self-selection bias does not affect individual decisions of worker’s location). Models are estimated separately for each category. Logit has a practical advantage over probit when the sum of predicted values equal to the sum of empirically observed values (Butcher and Dinardo, 1998.) ENEU: Encuesta Nacional de Empleo Urbano (National Survey of Urban Employment). Males aging from 16 to 65 Occupations = (1 ,…, 4) 1: Formal self-employed 2: Informal self-employed 3: Formal wage-earners 4: Informal wage-earners Model 1 pooled Model 2 pooled

7 Syntax Compute the earnings distribution using DFL command.
dfl depvar indepvars [if exp] [in range] , outcome(varname) [nbins(integer) w(bandwidth) adaptive gauss quietly probit [logit default] graph(cfactual) graph_combine axis_selection_options axis_scale_options title_options dfl informal esc eda eda2 jefe dmiembros dwmenor drama1 drama3 /// drama4 dregion1 dregion2 dregion3 dregion4 dregion6 /// if sex==1 & logitp>=1 & logitp<=2, outcome(logwm) nbins(50) /// adaptive gauss graph(cfactual) 2. Compute the earnings distribution using do-file. pscore informalb esc eda eda2 jefe dmiembros dwmenor drama1 drama3 drama4 /// dregion1 dregion2 dregion3 dregion4 dregion6 if sex==1 & logitp>=1 & logitp<=2, /// pscore(mypscore) logit level(0.001) akdensity logwm if sex==1 & logitp==4 [aw = mypscore], gau s(i) /// gen(hai92c dhai92c) lab var dhai92c “Informal wage-earner" replace dhai92c = dhai92c*.24 Example with my do-file

8 Figure 1.

9 Do file reescaled DFL command Figure 2. Wage-earners in Mexico working in a formal world, 1992.

10 Do file reescaled adjusting ranges
Figure 2a. Wage-earners in Mexico working in a formal world, 1992.

11 Do file reescaled DFL command Figure 3. Self-employed in Mexico working in a formal world, 1992.

12 Do file reescaled adjusting ranges
Figure 3a. Self-employed in Mexico working in a formal world, 1992.

13

14

15 Conclusions : DFL user written command is useful just watch out when using sub-groups or log scales. DFL (1996) use the subgroup decomposability property of the aggregate PDF. A suggestion when computing densities, consider population shares (if necessary) to weight them. The problem of obtaining over-dimensioned densities struggles the most when dealing with logarithmic scales for data. For kernel densities the estimation with the adaptive technique is more time-consuming but seems to be more accurate as well (it works better without smoothing more than needed). Adaptive kernel estimation depicts better bimodal or multimodal distributions

16 References Azevedo, Joao Pedro (2005). DiNardo, Fortin and Lemieux Counterfacual Kernel Density –DFL user written command-”. Becker, Sascha O., and Andrea Ichino (2002), “Estimation of average treatment effects based on propensity scores”, The Stata Journal, 2(4), Butcher, K. F. and John Dinardo (1998), “The immigrant and native-born wage distributions: Evidence from united states census”, NBER Working paper No Dinardo, John, Nicole Fortin, and Thomas Lemieux (1996), “Labor Market Institutions and the Distribution of Wages, : A semi-parametric approach”, Econometrica, 64(5), Duclos, Jean-Yves (2001), “Non-parametric estimation for distributive analysis”, Poverty and Equity: theory and estimation, Departament d’Economia Aplicada, Universitat Autònoma de Barcelona, mimeo, March, Huesca, Luis and Mario Camberos (2009), "El mercado laboral mexicano 1992 y 2002: Un análisis contrafactual de los cambios en la informalidad", Economía Mexicana, Vol. XVIII, Núm. 1, primer semestre, pp Heckman, James, Ichimura, H. and Todd, P. E. (1998), "Matching as an Econometric Evaluation Estimator", Review of Economic Studies, 65, Inegi (2006), Encuesta Nacional de Empleo Urbano, and 2002, ENEU, INEGI, Ags., México, Bases de datos. Jenkins, Stephen and Phillipe Van Kerm (2005), “Accounting for income distribution trends: A density function decomposition approach”, Journal of Economic Inequality, 3, pp Silverman, B. W. (1986). Density estimation for statistics and data analysis. Chapman and Hall. London. Van-Kerm, Phillipe (2003), “Adaptive kernel density estimation”, -akdensity- The Stata Journal, 3(2),


Download ppt "1st. STATA Group Meeting Mexico"

Similar presentations


Ads by Google