***Project 2 2020 for Panel Data*** ***FOR ALL THE COUNTRIES IN WEST AFRICA (LMICs and LICs*** encode countryname, gen(country) order country xtset country time ***Principal Component Analysis (PCA) for Istitutional Indicators*** pca coc ge ps rq rol vaa predict iq, score ***Institutions Indicators in three Categorizations*** ***Economic Institutions (ei) comprise Government Effectiveness and Regulatory Quality*** pca ge rq predict ei, score ***Legal Institutions (li) comprise the control of corruption and the Rule of Law*** pca coc rol predict li, score ***Political Institutions (pi) are composed of Political Stability and Voice & Accountability*** pca ps vaa predict pi, score ***Generate Series*** generate lpop = log(pop) generate iqrec = iq*rec generate eirec = ei*rec generate lirec = li*rec generate pirec = pi*rec ***STEP 1: Generate Descriptive Statistics and Correlation Coefficients*** xtset country time ***For both LICs and LMICs with bunded Institutional Indicators*** xtsum ip iq ei li pi rec fdi dcps lpop infr to pwcorr ip iq ei li pi rec fdi dcps lpop infr to, sig ***FOR EQUATIONS WITH NO INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to reg ip ei rec fdi dcps lpop infr to reg ip li rec fdi dcps lpop infr to reg ip pi rec fdi dcps lpop infr to ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, fe robust est sto fixed1 xtreg ip ei rec fdi dcps lpop infr to, fe robust est sto fixed2 xtreg ip li rec fdi dcps lpop infr to, fe robust est sto fixed3 xtreg ip pi rec fdi dcps lpop infr to, fe robust est sto fixed4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, re robust est sto re1 xtreg ip ei rec fdi dcps lpop infr to, re robust est sto re2 xtreg ip li rec fdi dcps lpop infr to, re robust est sto re3 xtreg ip pi rec fdi dcps lpop infr to, re robust est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to, re est sto re1 hausman fe1 re1, sigmamore xtreg ip ei rec fdi dcps lpop infr to, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to, re est sto re2 hausman fe2 re2, sigmamore xtreg ip li rec fdi dcps lpop infr to, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to, re est sto re3 hausman fe3 re3, sigmamore xtreg ip pi rec fdi dcps lpop infr to, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to, re est sto re4 hausman fe4 re4, sigmamore ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to estimates store, pols1 xtreg ip iq rec fdi dcps lpop infr to, re robust est sto re1 xttest0 reg ip ei rec fdi dcps lpop infr to est sto pols2 xtreg ip ei rec fdi dcps lpop infr to, re robust est sto re2 xttest0 reg ip li rec fdi dcps lpop infr to est sto pols3 xtreg ip li rec fdi dcps lpop infr to, re robust est sto re3 xttest0 reg ip pi rec fdi dcps lpop infr to est sto pols4 xtreg ip pi rec fdi dcps lpop infr to, re robust est sto re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to, fe xttest2 xtreg ip li rec fdi dcps lpop infr to, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to, fe xttest3 xtreg ip li rec fdi dcps lpop infr to, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to, fe ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to xtserial ip ei rec fdi dcps lpop infr to xtserial ip li rec fdi dcps lpop infr to xtserial ip pi rec fdi dcps lpop infr to ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to, fe lag(1) est sto fe1 xtscc ip ei rec fdi dcps lpop infr to, fe lag(1) est sto fe2 xtscc ip li rec fdi dcps lpop infr to, fe lag(1) est sto fe3 xtscc ip pi rec fdi dcps lpop infr to, fe lag(1) est sto fe4 ***EQUATIONS WITH INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to iqrec est sto pols1 reg ip ei rec fdi dcps lpop infr to eirec est sto pols2 reg ip li rec fdi dcps lpop infr to lirec est sto pols3 reg ip pi rec fdi dcps lpop infr to pirec est sto pols4 ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, fe est sto fe1 xtreg ip ei rec fdi dcps lpop infr to eirec, fe est sto fe2 xtreg ip li rec fdi dcps lpop infr to lirec, fe est sto fe3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe est sto fe4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, re robust est sto re1 xtreg ip ei rec fdi dcps lpop infr to eirec, re robust est sto re2 xtreg ip li rec fdi dcps lpop infr to lirec, re robust est sto re3 xtreg ip pi rec fdi dcps lpop infr to pirec, re robust est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re est sto re1 hausman fe1 re1, sigmamore xtreg ip ei rec fdi dcps lpop infr to eirec, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to eirec, re est sto re2 hausman fe2 re2, sigmamore xtreg ip li rec fdi dcps lpop infr to lirec, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to lirec, re est sto re3 hausman fe3 re3, sigmamore xtreg ip pi rec fdi dcps lpop infr to pirec, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to pirec, re est sto re4 hausman fe4 re4, sigmamore ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to iqrec estimates store, pols1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re robust estimates store, re1 xttest0 reg ip ei rec fdi dcps lpop infr to eirec estimates store, pols2 xtreg ip ei rec fdi dcps lpop infr to eirec, re robust estimates store, re2 xttest0 reg ip li rec fdi dcps lpop infr to lirec estimates store, pols3 xtreg ip li rec fdi dcps lpop infr to lirec, re robust estimates store, re3 xttest0 reg ip pi rec fdi dcps lpop infr to pirec estimates store, pols4 xtreg ip pi rec fdi dcps lpop infr to pirec, re robust estimates store, re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest2 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to pirec, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest3 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to iqrec xtserial ip ei rec fdi dcps lpop infr to eirec xtserial ip li rec fdi dcps lpop infr to lirec xtserial ip pi rec fdi dcps lpop infr to pirec ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to iqrec, fe lag(1) estimates store fe1 xtscc ip ei rec fdi dcps lpop infr to eirec, fe lag(1) estimates store fe2 xtscc ip li rec fdi dcps lpop infr to lirec, fe lag(1) estimates store fe3 xtscc ip pi rec fdi dcps lpop infr to pirec, fe lag(1) estimates store fe4 ***FOR LOWER-MIDDLE-INCOME COUNTRIES (LMICs) IN WEST AFRICA*** ***Project 2 2020 for Panel Data*** encode countryname, gen(country) order country xtset country time ***Principal Component Analysis (PCA) for Istitutional Indicators*** pca coc ge ps rq rol vaa predict iq, score ***Institutions Indicators in three Categorizations*** ***Economic Institutions (ei) comprise Government Effectiveness and Regulatory Quality*** pca ge rq predict ei, score ***Legal Institutions (li) comprise the control of corruption and the Rule of Law*** pca coc rol predict li, score ***Political Institutions (pi) are composed of Political Stability and Voice & Accountability*** pca ps vaa predict pi, score ***Generate Series*** generate lpop = log(pop) generate iqrec = iq*rec generate eirec = ei*rec generate lirec = li*rec generate pirec = pi*rec ***STEP 1: Generate Descriptive Statistics and Correlation Coefficients*** xtset country time ***For LMICs with bunded Institutional Indicators*** xtsum ip iq ei li pi rec fdi dcps lpop infr to pwcorr ip iq ei li pi rec fdi dcps lpop infr to, sig ***FOR EQUATIONS WITH NO INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to reg ip ei rec fdi dcps lpop infr to reg ip li rec fdi dcps lpop infr to reg ip pi rec fdi dcps lpop infr to ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, fe est sto fixed1 xtreg ip ei rec fdi dcps lpop infr to, fe est sto fixed2 xtreg ip li rec fdi dcps lpop infr to, fe est sto fixed3 xtreg ip pi rec fdi dcps lpop infr to, fe est sto fixed4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, re est sto re1 xtreg ip ei rec fdi dcps lpop infr to, re est sto re2 xtreg ip li rec fdi dcps lpop infr to, re est sto re3 xtreg ip pi rec fdi dcps lpop infr to, re est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to, re est sto re1 hausman fe1 re1 xtreg ip ei rec fdi dcps lpop infr to, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to, re est sto re2 hausman fe2 re2 xtreg ip li rec fdi dcps lpop infr to, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to, re est sto re3 hausman fe3 re3 xtreg ip pi rec fdi dcps lpop infr to, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to, re est sto re4 hausman fe4 re4 ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to estimates store, pols1 xtreg ip iq rec fdi dcps lpop infr to, re robust est sto re1 xttest0 reg ip ei rec fdi dcps lpop infr to est sto pols2 xtreg ip ei rec fdi dcps lpop infr to, re robust est sto re2 xttest0 reg ip li rec fdi dcps lpop infr to est sto pols3 xtreg ip li rec fdi dcps lpop infr to, re robust est sto re3 xttest0 reg ip pi rec fdi dcps lpop infr to est sto pols4 xtreg ip pi rec fdi dcps lpop infr to, re robust est sto re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to, fe xttest2 xtreg ip li rec fdi dcps lpop infr to, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to, fe xttest3 xtreg ip li rec fdi dcps lpop infr to, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to, fe xttest3 ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to xtserial ip ei rec fdi dcps lpop infr to xtserial ip li rec fdi dcps lpop infr to xtserial ip pi rec fdi dcps lpop infr to ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to, fe lag(1) est sto fe1 xtscc ip ei rec fdi dcps lpop infr to, fe lag(1) est sto fe2 xtscc ip li rec fdi dcps lpop infr to, fe lag(1) est sto fe3 xtscc ip pi rec fdi dcps lpop infr to, fe lag(1) est sto fe4 ***EQUATIONS WITH INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to iqrec est sto pols1 reg ip ei rec fdi dcps lpop infr to eirec est sto pols2 reg ip li rec fdi dcps lpop infr to lirec est sto pols3 reg ip pi rec fdi dcps lpop infr to pirec est sto pols4 ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, fe est sto fe1 xtreg ip ei rec fdi dcps lpop infr to eirec, fe est sto fe2 xtreg ip li rec fdi dcps lpop infr to lirec, fe est sto fe3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe est sto fe4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, re est sto re1 xtreg ip ei rec fdi dcps lpop infr to eirec, re est sto re2 xtreg ip li rec fdi dcps lpop infr to lirec, re est sto re3 xtreg ip pi rec fdi dcps lpop infr to pirec, re est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re est sto re1 hausman fe1 re1 xtreg ip ei rec fdi dcps lpop infr to eirec, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to eirec, re est sto re2 hausman fe2 re2 xtreg ip li rec fdi dcps lpop infr to lirec, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to lirec, re est sto re3 hausman fe3 re3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to pirec, re est sto re4 hausman fe4 re4 ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to iqrec estimates store, pols1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re robust estimates store, re1 xttest0 reg ip ei rec fdi dcps lpop infr to eirec estimates store, pols2 xtreg ip ei rec fdi dcps lpop infr to eirec, re robust estimates store, re2 xttest0 reg ip li rec fdi dcps lpop infr to lirec estimates store, pols3 xtreg ip li rec fdi dcps lpop infr to lirec, re robust estimates store, re3 xttest0 reg ip pi rec fdi dcps lpop infr to pirec estimates store, pols4 xtreg ip pi rec fdi dcps lpop infr to pirec, re robust estimates store, re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest2 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to pirec, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest3 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to iqrec xtserial ip ei rec fdi dcps lpop infr to eirec xtserial ip li rec fdi dcps lpop infr to lirec xtserial ip pi rec fdi dcps lpop infr to pirec ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to iqrec, fe lag(1) estimates store fe1 xtscc ip ei rec fdi dcps lpop infr to eirec, fe lag(1) estimates store fe2 xtscc ip li rec fdi dcps lpop infr to lirec, fe lag(1) estimates store fe3 xtscc ip pi rec fdi dcps lpop infr to pirec, fe lag(1) estimates store fe3 ***FOR ALL (5) LOW-INCOME COUNTRIES (LICs) IN WEST AFRICA*** ***Project 2 2020 for Panel Data*** encode countryname, gen(country) order country xtset country time ***Principal Component Analysis (PCA) for Istitutional Indicators*** pca coc ge ps rq rol vaa predict iq, score ***Institutions Indicators in three Categorizations*** ***Economic Institutions (ei) comprise Government Effectiveness and Regulatory Quality*** pca ge rq predict ei, score ***Legal Institutions (li) comprise the control of corruption and the Rule of Law*** pca coc rol predict li, score ***Political Institutions (pi) are composed of Political Stability and Voice & Accountability*** pca ps vaa predict pi, score ***Generate Series*** generate lpop = log(pop) generate iqrec = iq*rec generate eirec = ei*rec generate lirec = li*rec generate pirec = pi*rec ***STEP 1: Generate Descriptive Statistics and Correlation Coefficients*** xtset country time ***For LICs with bunded Institutional Indicators*** xtsum ip iq ei li pi rec fdi dcps lpop infr to pwcorr ip iq ei li pi rec fdi dcps lpop infr to, sig ***FOR EQUATIONS WITH NO INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to reg ip ei rec fdi dcps lpop infr to reg ip li rec fdi dcps lpop infr to reg ip pi rec fdi dcps lpop infr to ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, fe cluster (country) est sto fixed1 xtreg ip ei rec fdi dcps lpop infr to, fe cluster (country) est sto fixed2 xtreg ip li rec fdi dcps lpop infr to, fe cluster (country) est sto fixed3 xtreg ip pi rec fdi dcps lpop infr to, fe cluster (country) est sto fixed4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to, re robust est sto re1 xtreg ip ei rec fdi dcps lpop infr to, re robust est sto re2 xtreg ip li rec fdi dcps lpop infr to, re robust est sto re3 xtreg ip pi rec fdi dcps lpop infr to, re robust est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to, re est sto re1 hausman fe1 re1 xtreg ip ei rec fdi dcps lpop infr to, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to, re est sto re2 hausman fe2 re2 xtreg ip li rec fdi dcps lpop infr to, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to, re est sto re3 hausman fe3 re3 xtreg ip pi rec fdi dcps lpop infr to, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to, re est sto re4 hausman fe4 re4 ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to estimates store, pols1 xtreg ip iq rec fdi dcps lpop infr to, re robust est sto re1 xttest0 reg ip ei rec fdi dcps lpop infr to est sto pols2 xtreg ip ei rec fdi dcps lpop infr to, re robust est sto re2 xttest0 reg ip li rec fdi dcps lpop infr to est sto pols3 xtreg ip li rec fdi dcps lpop infr to, re robust est sto re3 xttest0 reg ip pi rec fdi dcps lpop infr to est sto pols4 xtreg ip pi rec fdi dcps lpop infr to, re robust est sto re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to, fe xttest2 xtreg ip li rec fdi dcps lpop infr to, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to, fe xttest3 xtreg ip li rec fdi dcps lpop infr to, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to, fe xttest3 ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to xtserial ip ei rec fdi dcps lpop infr to xtserial ip li rec fdi dcps lpop infr to xtserial ip pi rec fdi dcps lpop infr to ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to, fe lag(1) est sto fe1 xtscc ip ei rec fdi dcps lpop infr to, fe lag(1) est sto fe2 xtscc ip li rec fdi dcps lpop infr to, fe lag(1) est sto fe3 xtscc ip pi rec fdi dcps lpop infr to, fe lag(1) est sto fe4 ***EQUATIONS WITH INTERACTION TERMS*** ***STEP 2: Estimate the Pooled OLS (pols) Model*** reg ip iq rec fdi dcps lpop infr to iqrec est sto pols1 reg ip ei rec fdi dcps lpop infr to eirec est sto pols2 reg ip li rec fdi dcps lpop infr to lirec est sto pols3 reg ip pi rec fdi dcps lpop infr to pirec est sto pols4 ***STEP 3:Estimate the Fixed Effects (fe) Model*** xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, fe cluster (country) est sto fe1 xtreg ip ei rec fdi dcps lpop infr to eirec, fe cluster (country) est sto fe2 xtreg ip li rec fdi dcps lpop infr to lirec, fe cluster (country) est sto fe3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe cluster (country) est sto fe4 ***STEP 4: Estimate the Random Effects (re) Model*** xtset country time xtset country time xtreg ip iq rec fdi dcps lpop infr to iqrec, re robust est sto re1 xtreg ip ei rec fdi dcps lpop infr to eirec, re robust est sto re2 xtreg ip li rec fdi dcps lpop infr to lirec, re robust est sto re3 xtreg ip pi rec fdi dcps lpop infr to pirec, re robust est sto re4 ***STEP 4A: Comparing the Fixed Effects (fe) Model and the Random Effects (re) Model using the Hausman Test*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe est sto fe1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re est sto re1 hausman fe1 re1, sigmamore xtreg ip ei rec fdi dcps lpop infr to eirec, fe est sto fe2 xtreg ip ei rec fdi dcps lpop infr to eirec, re est sto re2 hausman fe2 re2, sigmamore xtreg ip li rec fdi dcps lpop infr to lirec, fe est sto fe3 xtreg ip li rec fdi dcps lpop infr to lirec, re est sto re3 hausman fe3 re3, sigmamore xtreg ip pi rec fdi dcps lpop infr to pirec, fe est sto fe4 xtreg ip pi rec fdi dcps lpop infr to pirec, re est sto re4 hausman fe4 re4, sigmamore ***STEP 4B: Comparing the Random Effects (re) Model and the Pooled OLS (pols) Model using the xttest0 Test*** reg ip iq rec fdi dcps lpop infr to iqrec est sto pols1 xtreg ip iq rec fdi dcps lpop infr to iqrec, re robust est sto re1 xttest0 reg ip ei rec fdi dcps lpop infr to eirec estimates store, pols2 xtreg ip ei rec fdi dcps lpop infr to eirec, re robust estimates store, re2 xttest0 reg ip li rec fdi dcps lpop infr to lirec estimates store, pols3 xtreg ip li rec fdi dcps lpop infr to lirec, re robust estimates store, re3 xttest0 reg ip pi rec fdi dcps lpop infr to pirec estimates store, pols4 xtreg ip pi rec fdi dcps lpop infr to pirec, re robust estimates store, re4 xttest0 ***Step 5: If fe Model is preferred, We Assess Contemporaneous Correlation Using B-P LM Test for the FE Model*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest2 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest2 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest2 xtreg ip pi rec fdi dcps lpop infr to pirec, fe xttest2 *** Step 5: Testing for Heteroscedasticity*** xtreg ip iq rec fdi dcps lpop infr to iqrec, fe xttest3 xtreg ip ei rec fdi dcps lpop infr to eirec, fe xttest3 xtreg ip li rec fdi dcps lpop infr to lirec, fe xttest3 xtreg ip pi rec fdi dcps lpop infr to pirec, fe ***Step 6: Testing for Serial Correlation*** xtserial ip iq rec fdi dcps lpop infr to iqrec xtserial ip ei rec fdi dcps lpop infr to eirec xtserial ip li rec fdi dcps lpop infr to lirec xtserial ip pi rec fdi dcps lpop infr to pirec ***Step 7: Conduct the Driscoll-Kraay Standard Errors Analysis to correct the presence of Contemporaneous Correlation, Heterescedasticity and Serial Correlation in the FE Model*** xtscc ip iq rec fdi dcps lpop infr to iqrec, fe lag(1) estimates store fe1 xtscc ip ei rec fdi dcps lpop infr to eirec, fe lag(1) estimates store fe2 xtscc ip li rec fdi dcps lpop infr to lirec, fe lag(1) estimates store fe3 xtscc ip pi rec fdi dcps lpop infr to pirec, fe lag(1) estimates store fe3