代做MIEF Stata Workshop 2024代做R语言
- 首页 >> C/C++编程MIEF Stata Workshop
Final Assignment
Updated: January 2024
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 variables (cannot all be from IMF) and clean and convert the associated 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 overtime (may have to put on separate y-axes). Format the chart so the title contains the
country name. Also, save each chart so filename includes the country name in it.
5. Also using a loop, plot 3 separate line charts (one for each variable) showing the advanced economy medians. Save and title the graphs to accurately reflect the variable being shown.
6. Using your 3 variables run regressions using thereghdfe 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 outreg 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 January 27, 2024 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)