Martin Huber, "Identifying Causal Mechanisms (Primarily) Based on Inverse Probability Weighting", Journal of Applied Econometrics, Vol. 29, No. 6, 2014, pp. 920-943. The Stata file "causalmech.dta" contains a subsample of the U.S. Job Corps experimental data, namely those 10025 observations for which the mediator and the outcome variable (see below) are observed, which are considered in the empirical application of the paper. The treatment assignment variable D is "treat", which is 1 if assigned to the program group and 0 if assigned to the control group. The outcome variable Y is "exhealth30", which is 1 if health is stated to be excellent 2.5 years after assignment and 0 otherwise. The mediator M is "work2year2q", which is 1 if employed some time in the first half of the second year after assignment and 0 otherwise. The variable "female" indicates gender, required for conducting the analysis separately for women and men The vector of pre-treatment confounders X consists of the following variables (see the respective variable labels in "causalmech.dta" for their meanings): schobef, trainyrbef, jobeverbef, jobyrbef, health012, health0mis,pe_prb0, pe_prb0mis, everalc, alc12, everilldrugs, age_cat, edumis, eduhigh, rwhite, everarr, hhsize, hhsizemis, hhinc12, hhinc8, fdstamp, welf1, welf2, publicass The vector of post-treatment confounders W consists of the following variables (see the respective variable labels in "causalmech.dta" for their meanings): emplq4, emplq4full, pemplq4, pemplq4mis, vocq4, vocq4mis, health1212, health123, pe_prb12, pe_prb12mis, narry1, numkidhhf1zero, numkidhhf1onetwo, pubhse12, h_ins12a, h_ins12amis The R script "causal-mech.R" contains the R functions for the various estimators as well as the estimation of the empirical application. The file causalmech.dta is zipped in the file mh-dta.zip. The files causalmech.csv (an ASCII file that contains the same dataset as causalmech.dta) and causal-mech.R are zipped in the file mh-files.zip. Unix/Linux users should use "unzip -a" for mh-files.zip but not for mh-dta.zip.