Topic > Data Manipulation - 1206

Data ManipulationBefore running the regressions in STATA, the data was adjusted for missing observations. These were originally coded as 99999 for missing values, which would have generated very incorrect coefficients, and were therefore replaced with a “.” to omit them from the regression. Difference in Difference For simple difference in difference I am regressing the interaction term of post along with the fixed effect of periods and ever_treat on the dependent variable weeks to observe how these control variables affected the total number of weeks the dependency worked when they were in treatment compared to drug addicts who were not treated. Simple Difference in Difference Equation: weeks_it=β_0+β_1 ever_treat_i+〖δ_t+β〗_2 post_i+u_iExplanation of Variables in Equation In the equation the ever_treat control means whether or not one was in the treatment group. It is the equivalent of the treatment group in a Difference in Difference and is used as a dummy variable to separate whether the individual was ever treated, regardless of the period. It is assigned a value of one if the addict has ever been treated and zero if the addict has never been treated.〖Additionally, δ〗_t denotes time effects or period fixed effects that account for overall changes between periods. This time period allows for the analysis of averages during a given time period; however, period 1 is missed due to fixed effects, so all period coefficients are compared to period 1 which is omitted. The post variable is the equivalent of the interaction term between post and treatment and captures the effect of the treatment on the amount of weeks worked. Regression data tableweeks_it=β_0+β_1 ever_treat_i+〖δ_t+β〗_2 post_i+u_i(1)VARIABLES weeks...... middle of paper ......observed in the data because when analyzing the means of between the variables there is a heritable difference in educational levels between those in the control group versus those treated. In the control group the average level of education was 10.8 years while the treated drug addicts had an average level of education of 12.1 years. As can be seen in the table above, the coefficient of educ is 0.715, which is positive, and therefore has a positive effect on the amount of weeks worked by drug addicts who were in the treatment program. This difference in education levels may have exacerbated the (post)treatment effect by making it appear more effective than it actually was. As shown in the tables below, most variable means were extremely similar and therefore unbiased, however the only variable showing a bias in favor of the treatment group is education.