Question Description
In this assignment you will work on Stata to replicate table 4 of a paper on schools in Afghanistan. In this paper, a randomized controlled trial was done where some villages were randomly assigned to receive a new school.
Homework instruction:
In this exercise you will replicate table 4 of the paper on school construction in Afghanistan. That is, you will try to get the same results as the authors.
Data: the data comes from the website of the journal. (It is standard procedure for authors to share their data upon publication). The authors shared a number of data files. The file “Afghanistan_anonymized_data.dta” contains the data you need to replicate table 4 and 5.
Original do file: I’ve also included the do-file the authors put together. Take a look to see how advanced Stata programming looks like.
Step 1: Data overview
The first thing to do is to open the file on Stata, and create a new “do file”.
- Each unit of observation is a child.
- Variables start with “s08” or “f07”. This clearly indicates when the data was collected (in 2007 or 2008).
- The Label tells you what is measured in the variable. Read these labels carefully.
- The treatment variable is called “treatment”
- Chagcharan is always included as a control, in all regressions.
Step 2: Outliers
Looking at the do file created by the authors, I see that they created a new variable called “nonoutlier”. Here’s the code they used.
20 & f07_observed == 1 replace nonoutlier = 0 if f07_jeribs_cnt > 10 & f07_observed == 1 replace nonoutlier = 0 if f07_num_sheep_cnt > 50 & f07_observed == 1 replace nonoutlier = 0 if s08_num_ppl_hh_cnt > 20 & s08_observed == 1 replace nonoutlier = 0 if s08_jeribs_cnt > 10 & s08_observed == 1 replace nonoutlier = 0 if s08_num_sheep_cnt > 50 & s08_observed == 1 " v:shapes="Text_x0020_Box_x0020_1">
- According to this code, what characterizes an outlier observation?
- Copy the code in your do file.
- Use the following code to tell me how many children are considered outliers by the authors:
Table 4: Treatment effects by Gender
Column 1: Enrollment (without controls)
Column 1 has two regressions: in Panel A, only Girls are considered. In Panel B, only Boys are considered. In addition, only those who took the text are included in the regression, and outliers are excluded.
Here are the variables in the regression.
Outcome variable y : f07_formal_school
Independent variables x1 and x2: treatment and chagcharan
If statement: f07_girl_cnt ==1 &nonoutlier ==1 & f07_test_observed ==1 (for girls)
Standard errors: In the text, they use a fancy way to generate standard errors. Here, we’ll use robust to adjust for heteroscedasticity.
This means that the regression for girls will look like this:
For boys, the dummy variable f07_girl_cnt must be 0.
- Run the regression above for girls.
- Use the following code to create table 4 and apply the regression into a table:
- Run the regression above for boys.
- Use the following code to append the result for boys on the regression table above:
- Are your results similar to the authors? How different are your standard errors?
- Run the two regressions including the outliers. Are your coefficient estimates very different? If they are, we say that the regression is sensitive to the inclusion of outliers. (You don’t need to include the regressions with outlier in the table 4.
(you will use the “append” command every time you add a new column to table 4).
Column 2: Enrollment (with controls)
Now we are going to run the column 2, which regresses formal enrollment on treatment plus demographic controls.
The list of control variables is this:
f07_heads_child_cnt f07_girl_cnt f07_age_cnt f07_duration_village_cnt f07_farsi_cnt f07_tajik_cnt f07_farmer_cnt f07_age_head_cnt f07_yrs_ed_head_cnt f07_num_ppl_hh_cnt f07_jeribs_cnt f07_num_sheep_cnt f07_nearest_scl.
- Run the regression on girls from column 1, including the list of controls.
- Use outreg2 to append the regression results in table 4. (This will be the 3rd column in your table).
- Run the regression on boys, including the list of controls.
- Use outreg2 to append the the regression results in table 4. (This will be the 4th column in your table.
- Look at your regression results. Are any controls statistically significant? Comment on the meaning of one statistically significant control variable.
Column 3: Fall 2007 test (without controls)
Now you are going to replicate the third column, which looks at the test scores in 2007 for boys and girls. Append the two regressions to table 4. (5th and 6th column)
Outcome variable y : f07_both_norma_total
Independent variables x1 and x2: treatment and chagcharan
If statement: f07_girl_cnt ==1 &nonoutlier ==1 & f07_test_observed ==1 (for girls)
Standard errors: In the text, they use a fancy way to generate standard errors. Here, we’ll use robust to adjust for heteroscedasticity.
Column 4: Fall 2007 test (with controls)
Repeat the last two regressions using the control list given above.
Make the table readable and clear.
Now you have an excel table with 8 columns. Before you turn it in to me:
- Relabel the column titles to make sure that it’s clear what regression we are looking at (i.e., dependent variable, boys vs. girls).
- Relabel the variable names to make clear what they represent.
- Format the excel table to landscape so it fits into a single page.
Table 4 b: 2008 test results
Create a new table with the 2008 results; call that table table4b
Outcome variable: s08_both_norma_total
Set of controls (for column 7 in the published paper):
s08_heads_child_cnt s08_girls_cnt s08_age_cnt s08_duration_village_cnt s08_farsi_cnt s08_tajik_cnt s08_farmer_cnt s08_age_head_cnts08_yrs_ed_head_cnt s08_num_ppl_hh_cnt s08_jeribs_cnt s08_num_sheep_cnt s08_nearest_scl
Format the table “nicely” (as you’ve done for table 4).
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.