Economic stata work

0 comments

In this assignment, you must work with STATA to analyze the data from an experiment carried
out in Tanzania in 2011 to test the effect of family obligations on the ability to save.

The experiment worked as follows. Researchers randomly selected approximately 40 individuals
in 4 rural villages to answer a questionnaire; respondents were either men or women, living in
a household with a spouse. At the end of the interview, the respondent was given an envelope
with 10,000 shillings ($7). The respondent was told that the research team was to return in
three weeks for a follow-up visit. The researchers were going to verify how much was kept in
the envelope, and provide the respondent with an additional 20% on whatever was left inside it
(up to a maximum of 2,000 shillings). Respondents were allowed to keep all the money given to
them.

The experiment had two relevant features.

  • Before giving the envelope, researchers wrote down the individual bill code number. During
    the follow-up verification visit, they verified whether the bills in the envelope were put there
    by the researchers or placed there by the respondents. By checking code numbers, they
    could check whether the respondent (or someone in the family) took money out of the
    envelope.
  • Respondents were randomly assigned to two treatments.

    1. (a) The first treatment, which I call P RIV AT E, corresponds to the case where the recipi-
      ent was privately given the envelope, without the knowledge of relatives or family. The
      envelope was nondescript and had no clear markings.
    2. (b) The second treatment, PUBLIC involved handing over the envelope to the recipient in
      front of at least some members of the family. The envelope had a transparent window,
      through which one could see that there was money.

The objective of the exercise is to determine whether savings behavior is affected by other
people’s knowledge of their savings. The hypothesis is that it’s hard to hold on to savings if
people know you have money.

The data is contained in the tex file moneyexperiment.dta. The treatment is written in the
dummy public. Use Stata for the analysis.

(a) The first task is to verify randomization, by showing whether E(XPu) = E(XPr).

1

Variable Public Private Difference

gender 0.519
(0.098)

wealth index 0.407
(0.096)

etc.

0.473
(0.118)
0.368
(0.114)

0.045
(0.153)
0.039
(0.149)

Figure 1: Example of a summary table/balance of treatment arms

  • Create a summary table with summary statistics for the following baseline characteris-
    tics of respondents: sex (dummy is 1 for female), wealth index, schooling, rosca partic-
    ipation, pnil, hyperbolic by treatment group. Group your summary statistics by public
    and private. You can use the Stata command ttest. You can find the description of the
    command in the menu help/Stata Command… and then typing ttest in the command
    box. You can also see a video of ttest here:
  • Make sure to include the average and standard deviation for each variable and each
    treatment group.
  • Show standard errors of the difference in means between the public and private treat-
    ment groups. See example above.
  • To date, Stata does not have a good command to create summary statistics table. One
    way to do this, cut and paste the relevant statistics from ttest. Another way is to use
    the command summarize … if public == 0 and summarize … if public ==
    1.
  • Write a short paragraph explaining whether the table indicates that the treatment
    groups are balanced.
    (b) Now let’s see what the distribution of one of the main outcome variables of interest. Create
    a histogram graph of this outcome variable. To start, use the drop-down menu Graphics,
    then Distributional graphs, then choose Histogram. This will lead to a window.

    • Under “Main” tab, choose amtleft in the variable
    • Choose the button “data are continuous”.
    • under Y-axis, choose “Fraction”.
    • Then look around the other tabs. You should put a title, and label the X axis and
      Y axis as you think it’s appropriate (your call!). Feel free to change the “feel” of the
      graph until you are satisfied. Feel free to experiment!
    • If you want to see how the graph looks, click on “Submit”. A graph will appear. You
      can continue to modify the settings until you are satisfied. If you press “OK”, then
      the window will disappear and if you want to make more changes you’ll have to start
      again.

2

  • Once you have the graph that you want, you should go into the “Results” window of
    Stata (the window where you see all the results of your activities). You will see the
    command that generated your graph. The command will start with histogram… Copy
    the command and paste it in your do file.
  • Write a short paragraph describing the distribution of this variable.

(c) Now we introduce the first stage of the game. The intervention is supposed to change the

amount of information available to the household. Thus,

  1. Regress the dummy variables others knew about the envelope, others knew about the
    money in the envelope, whether the respondent hided the envelope, and whether the
    respondent kept money in the envelope on whether they received the public treatment
    (4 regressions).
  2. Regress the above on public and whether the respondent was a woman. (4 more
    regressions).
  3. Regress the above on public, whether the respondent was a woman, and the interaction
    between the two. (4 regressions). Use the following command:
    xi: reg Y i.female*i.public
    The xi command allows you to interact the dummy variables.
  4. Put all regressions in three separate tables using outreg2 or estout. See at the end
    of this document for some useful command. Upload the tables.
  5. Write a short paragraph to comment on the results. Explain the rationale for looking
    at these outcome variables. Explain also why we looked at women separately from
    men. Then, discuss the magnitudes of the coefficients (including the constant term).
    Be especially careful in explaining the meaning of the regressions with the two dummies
    interacted. Finally, explain whether the coefficients are significant, and whether they
    are large.

(d) Now consider the second stage. First, look at the dependent variable amtleft. This indi-
cates how much money (up to 10,000 shillings) was left in the envelope (where it could earn
20% return).

  1. Regress amtleft on public and whether the respondent was a woman.
  2. Regress amtleft on public interacted with woman.
  3. Do the same 2 regressions using origleft as outcome variable, the amour of original
    bills (from the initial pot) left.
  4. Again, comment on the results, being as careful as you have been in part iv in (b).
  5. Write one sentence on what you have learned from these results (if they indeed were
    to hold up–the sample size is small!).
  6. Put the four regressions in a table.

3

Some useful stata commands for making tables

You can easily export the tables using the command est store and outreg2. outreg2 is not a
standard Stata command, so you’ll need to download it. To do so, in the command line type the
following:

      findit outreg2

A help window will open. Find the command outreg2 in the list under the heading ”packages
found. Click on the blue link. A new window will open. Scroll to the bottom. There’ll be a link called
“Click here to install”. Click there to install.

With either estout or outreg2, your do file should look like this:

• regress y1 Treatment
• est store something1
• regress y1 Treatment sex
• est store something2
• xi: regress y1 i.Treatment*i.sex
• est store something3
• outreg2 [something1 something2 something3] using table1.xls

The command est store creates a temporary variable with name something1 etc. which includes
all the estimates that were generated in the regression. The command outreg2 takes the estimates
included in something1, something2 and something3 and exports them in an excel table, nicely for-
matted. Outreg2 is what most people use to generate regression tables.

If you go to the help menu and search for command outreg2 you will see that there are many
many ways to personalize the format of these regression tables.

Once you have your table in excel, make it nice: add an informative title, make sure the column
titles are clear, make sure that the explanatory variables are also clear.

What you will submit

You will submit the following items, all in one document.
• A complete do file
• A balanced treatment arms table, with comments.
• a histogram graph, with comments.

• three first stage tables, with comments.
4

• one second stage table, with comments.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}