Rizka - Isnaini.husna@mail - Ugm.ac - Id: Econometrics Problem Set 3
Rizka - Isnaini.husna@mail - Ugm.ac - Id: Econometrics Problem Set 3
Problem Set 3
On this assignment, you are instructed to do a data analysis using excel data. Please write all
of the command based on the instruction below in the given do-file. You can change the
name of the do-file with your name and NIU. Send the do-file, regression table, and the new
data to [email protected] before April 29th 2021 11.59 p.m. Good luck!
1. Write the date created, your name, and NIU in the do-file.
2. Set the main directory file where you save the data.
3. Import the macrodatanew.xls into STATA.
4. Change the string variable into numeric. Hint: you can use command encode.
5. State the data as panel.
6. This is the list of your variables:
a. Life_expec : Life expectancy at birth (years)
b. Gdp_cpt : GDP per capita (constant 2010 US$)
c. Unem : Unemployment, total (% of total labor force)
d. Invest : Gross capital formation (% of GDP)
e. Mortality : Mortality rate, infant (per 1,000 live births)
f. Fertility : Fertility rate, total (births per woman)
g. School : School enrollment, secondary (% gross)
Based on this information, change all of the variable labels using command label variable.
7. Create a new variable which is the logarithm form of GDP per capita.
8. We like to estimate the effect of log GDP per capita on life expectancy. We will use
unemployment, investment, school enrollment rate, mortality rate, and fertility rate as
controls. Based on this information, do the hausman test to choose the best model we can
use. What is the hausman test result? Answer this question in your do file.
9. Does your model suffer from serial correlation? Answer this question in your do file. Hint:
use command xtserial
10. Does your model suffer from multicollinearity? Answer this question in your do file. Hint:
use command corr or vif
11. Based on the hausman test result, do the following regression:
a. Regress the model only using the dependent and independent variables
b. Regress the model in (a) with control variables. Interpret the coefficient of gdp_cpt.
Hint: Remember, in level-log model, one percent increase in x leads to β1*0.01 units
increase in y.
12. Save (11a) and (11b) regression result into one table in word file. Save the word file as
yourname_NIU_macrodata.doc.
Hint: you can use command outreg2. If this command has not been installed, you can install
it using command help outreg2.
13. Save your new data as yourname_NIU_macrodata.dta.