Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MIEF Stata Workshop

Final Assignment

Updated: September 2022

You have been provided 10 (mostly macro) variables (see below).  Given the raw data (in excel or text file on Canvas), you must do the following:

1.   Pick 3 series (cannot all be from IMF) and clean the raw files to Stata .dta files.

2.   Make sure to accurately label each variable with source and brief definition.

3.   Merge your data to one aggregate dataset. Keep if _merge == 3.

4.   Using a loop, plot a line graph for each country showing the 3 variables over time (may have to put on separate y-axes). Format the chart so the title contains the     country name. Also, save each chart so file name includes the country name in it.

5.   Also using a loop, plot 3 separate line charts (one for each variable) showing the advanced economy medians1 . Save and title the graphs to accurately reflect the  variable being shown.

6.   Using your 3 variables run regressions using the reghdfe stata package (y regressed on x1 x2). The regression should make some economic sense, but that is of lesser   importance. You may transform variables however you’d like (logs, lags, etc.).

a.   Run three regressions: (1) baseline with no fixed effects; (2) year fixed effects; (3) country and year fixed effects.

b.   Produce a regression table using outreg2 showing the results of each FE specification (clearly labelling which FEs are being used)

What needs to be submitted?

1.   One .do file. It should be self-contained in that all I have to do is change the working directory and it will run.

a.   The do file should (1) import and clean each raw data file and save as .dta files; (2) merge the 3 variables together once cleaned and save as an          aggregate dataset; (3) run all analysis including charts and regressions and save to the working directory.

b.   Clearly comment throughout with what you are doing and why.

2.   Raw data (excel or text files). If you have to do some pre-cleaning in excel (e.g.  dropping n/a”, etc.) just submit the newly saved excel/text file after doing that (I only want whatever is imported into Stata).

3.   Final aggregate dataset in Stata. Ideally your code will run everything without this

and just produce and save the final aggregate dataset along the way. I just want it in case there are any issues in the cleaning and merging section of the do file       code.

Please submit by September 23, 2022 11:59pm on Canvas

Variables:

1.   Investment (% GDP) (IMF)

2.   Savings (% GDP) (IMF)

3.   Volume of Imports of Goods and Services (% change) (IMF)

4.   Volume of Exports of Goods and Services (% change) (IMF)

5.   Current Account (% GDP) (IMF)

6.   Capital Stock (% GDP) (Penn World Tables) (you are given capital stock and gdp – just need to divide in Stata to make new variable)

7.   Labor compensation share of GDP (Penn World Tables)

8.  Real Long-term (10 year) Government Bond Rate (OECD) (Nominal Bond Rate minus inflation rate (from IMF WEO data))

9.   Tobin’s Q (World Inequality Database) (measures expected returns from investment, as captured by the ratio of the market value of firms to the book value of their capital stock)

10. GINI index (World Bank) (measures distribution of incomes proxy for inequality)