import delimited "G77_UN_Feb23.csv", clear **Generate and transform variables gen ln_troops = log(troops+1) gen ln_pop = log(pop) gen ln_gdp_pc = log(gdp_pc) gen lnoil_pcgdp = log(oil_pcgdp+0.00001) gen lnobligations = log(obligations+1) gen lntroops = log(troops+1) gen lngdppc_x_polity = ln_gdp_pc*polity2 gen lngdppc_x_pts = ln_gdp_pc*pts_a gen lngdppc_x_polyarchy = ln_gdp_pc*v2x_polyarchy gen lngdppc_x_liberal = ln_gdp_pc*v2x_liberal gen lngdppc_x_civlib = ln_gdp_pc*v2x_civlib **As v2exl_legitideol can take negative values, indicating low ideological legitimation, **add min value to all observations before multiplying by the v2exl_legitideolcr_1, which **is measure of the importance of specifically socialist ideology from 0 to 1. gen ideol_legit = v2exl_legitideol+2.875 gen socialist_ideol = ideol_legit*v2exl_legitideolcr_1 generate decade = 1940 replace decade = 1950 if year>1949 replace decade = 1960 if year>1959 replace decade = 1970 if year>1969 replace decade = 1980 if year>1979 replace decade = 1990 if year>1989 replace decade = 2000 if year>1999 replace decade = 2010 if year>2009 replace decade =. if missing(year) ** 1 Americas, 2 Europe, 3 Africa, 4 MENA, 5 Asia, 6 Australasia generate region = 1 replace region = 2 if ccode>199 replace region = 3 if ccode>299 replace region = 4 if ccode>599 replace region = 5 if ccode>699 replace region = 6 if ccode>899 xtset ccode year generate lagln_gdp_pc = l.ln_gdp_pc generate lagv2x_polyarchy = l.v2x_polyarchy generate laglngdppc_x_polyarchy = l.lngdppc_x_polyarchy generate laglnoil_pcgdp = l.lnoil_pcgdp generate lagsocialist_ideol = l.socialist_ideol generate lagkaopen = l.kaopen generate lagpts_a = l.pts_a generate laglnobligations = l.lnobligations generate lagusally = l.usally generate lagcommunist = l.communist generate lagg77 = l.g77 generate lagln_pop = l.ln_pop generate lagv2x_liberal = l.v2x_liberal generate laglngdppc_x_liberal = l.lngdppc_x_liberal generate laglntroops = l.lntroops ***Descriptive statistics tabstat gdp_pc v2x_polyarchy pop usally, statistics( mean sd skewness kurtosis ) by(g77) **Bivariate t test ttest idealpoint, by(g77) unequal welch ** Time series line graph for Mexico's ideal point in the UN General Assembly twoway (tsline idealpoint if ccode == 70, cmissing(n)), title("G77 Membership and Mexico's Voting Position") ytitle("UNGA ideal point") xline(1965) xline(1995) xtitle("") **Initial model specification check regress idealpoint l.(ln_pop kaopen ln_gdp_pc oil_pcgdp g77 obligations usally socialist_ideol pts_a v2x_polyarchy lngdppc_x_polyarchy) linktest **The problem seems to be the high skew of some variables. Using the natural log of these variables removes the problem: regress idealpoint l.(ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations usally socialist_ideol pts_a v2x_polyarchy lngdppc_x_polyarchy) linktest **Check for multicollinearity. Variance inflation factor for the interacted terms is high, unsurprisingly. regress idealpoint l.(ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations usally socialist_ideol pts_a v2x_polyarchy lngdppc_x_polyarchy) vif ****Main analysis **Fixed Effects (decade, region) **Short regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.decade i.region, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) **LDV **Short regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), vce(cluster ccode) **Long regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) **NB: F-test shows that income, polyarchy and their interaction are jointly significant. **test ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy **Panel Corrected Standard Errors **Short xi: xtpcse idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise **Long, with manually created lags for compatibility with coeffplot xi: xtpcse idealpoint lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise **Coefficient plot coefplot, drop(_cons) xline(0) coeflabels(lagln_gdp_pc = "Log of GDP per capita" lagv2x_polyarchy = "Polyarchy" laglngdppc_x_polyarchy = "Polyarchy * Log of GDP per capita" lagln_pop = "Log population" lagsocialist_ideol ="Socialist ideology" lagkaopen = "Capital openness" laglnoil_pcgdp = "Log of oil as a % of GDP" lagpts_a = "Political terror" laglnobligations = "Log of US aid" lagusally = "US ally" lagg77 ="G77 membership") **Simultaneous equations **Using Keshk's cdsimeq package cdsimeq (idealpoint lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy session lagkaopen laglnoil_pcgdp lagsocialist_ideol) (g77 lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy session lagpts_a lagln_pop) ** Country and year fixed effects **Short regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.year, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.year, vce(cluster ccode) **Short regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.ccode, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.ccode, vce(cluster ccode) **Jackknife jackknife, cluster(ccode): regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.decade i.region, vce(cluster ccode) jackknife, cluster(ccode): regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) jackknife, cluster(ccode): regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), vce(cluster ccode) jackknife, cluster(ccode): regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) xi: jackknife, cluster(ccode): xtpcse idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: jackknife, cluster(ccode): xtpcse idealpoint lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise **Alternative independent variables ****Re-run models with VDem alternatives to polyarchy, first the 'liberal' measure. **Fixed Effects **Short regress idealpoint l.(ln_gdp_pc v2x_liberal lngdppc_x_liberal ln_pop socialist_ideol g77) i.decade i.region, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc v2x_liberal lngdppc_x_liberal ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) **LDV **Short regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_liberal lngdppc_x_liberal ln_pop socialist_ideol g77), vce(cluster ccode) **Long regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_liberal lngdppc_x_liberal ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) **Panel Corrected Standard Errors **Short xi: xtpcse idealpoint l.(ln_gdp_pc v2x_liberal lngdppc_x_liberal ln_pop socialist_ideol g77), corr(ar1) pairwise **Long, with manually created lags for compatibility with coeffplot xi: xtpcse idealpoint lagln_gdp_pc lagv2x_liberal laglngdppc_x_liberal lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise ****Re-run models with VDem alternatives to polyarchy, second the 'civil liberties' measure. **Remove the political terror variable because of the overlap with the concept of civil liberty. ****Re-run models with the Polity2 measure of representative democracy. **Fixed Effects **Short regress idealpoint l.(ln_gdp_pc polity2 lngdppc_x_polity ln_pop socialist_ideol g77) i.decade i.region, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc polity2 lngdppc_x_polity ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) **LDV **Short regress idealpoint l2.idealpoint l.(ln_gdp_pc polity2 lngdppc_x_polity ln_pop socialist_ideol g77), vce(cluster ccode) **Long regress idealpoint l2.idealpoint l.(ln_gdp_pc polity2 lngdppc_x_polity ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) **Panel Corrected Standard Errors **Short xi: xtpcse idealpoint l.(ln_gdp_pc polity2 lngdppc_x_polity ln_pop socialist_ideol g77), corr(ar1) pairwise **Long, with manually created lags for compatibility with coeffplot xi: xtpcse idealpoint lagln_gdp_pc polity2 lngdppc_x_polity lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise ****Re-ran models with communist dummy variable rather than the continuous socialist ideology **Fixed Effects **Short regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop communist g77) i.decade i.region, vce(cluster ccode) **Long regress idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop communist kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) **LDV **Short regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop communist g77), vce(cluster ccode) **Long regress idealpoint l2.idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop communist kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) **NB: F-test shows that income, polyarchy and their interaction are jointly significant. **test ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy **Panel Corrected Standard Errors **Short xi: xtpcse idealpoint l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop communist g77), corr(ar1) pairwise **Long xi: xtpcse idealpoint lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagcommunist lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise ***Re-run 'long' regressions with a the natural log of the number of US troops in place of the US Ally dummy variable. **Fixed Effects country xtreg idealpoint ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations lntroops communist pts_a v2x_polyarchy lngdppc_x_polyarchy, fe vce(cluster ccode) **Fixed effects year regress idealpoint ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations lntroops communist pts_a v2x_polyarchy lngdppc_x_polyarchy i.year, vce(cluster ccode) **LDV regress idealpoint l.idealpoint ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations lntroops communist pts_a v2x_polyarchy lngdppc_x_polyarchy, vce(cluster ccode) **Panel Corrected Standard Errors xi: xtpcse idealpoint ln_pop kaopen ln_gdp_pc lnoil_pcgdp g77 lnobligations lntroops communist pts_a v2x_polyarchy lngdppc_x_polyarchy, corr(ar1) pairwise ***Re-run models, changing dependent variable to % agreement with the US **Fixed Effects **Short regress pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.decade i.region, vce(cluster ccode) **Long regress pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, vce(cluster ccode) **LDV **Short regress pctagreeus l2.pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), vce(cluster ccode) **Long regress pctagreeus l2.pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77), vce(cluster ccode) **Panel Corrected Standard Errors **Short xi: xtpcse pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise **Long, with manually created lags for compatibility with coeffplot xi: xtpcse pctagreeus lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise **Short **Tobit regression with decadal and regional fixed effects **Short tobit pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77) i.decade i.region, ll(0) ul(1) vce(cluster ccode) **Long tobit pctagreeus l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol kaopen lnoil_pcgdp pts_a lnobligations usally g77) i.decade i.region, ll(0) ul(1) vce(cluster ccode) **Using idealpoints for specific issues as DV, **based on (non-exclusive) categorisation of resolutions according to issue xi: xtpcse bsv_colonial l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_colonial lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise xi: xtpcse bsv_disarm l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_disarm lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise xi: xtpcse bsv_economic l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_economic lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise xi: xtpcse bsv_humanr l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_humanr lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise xi: xtpcse bsv_middleeast l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_middleeast lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise xi: xtpcse bsv_nuclear l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse bsv_nuclear lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise **Using CA1 (first dimension of variance from the UN General Debate corpus derived using correspondence analysis) **as the dependent variable xi: xtpcse ca1 l.(ln_gdp_pc v2x_polyarchy lngdppc_x_polyarchy ln_pop socialist_ideol g77), corr(ar1) pairwise xi: xtpcse ca1 lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp lagpts_a laglnobligations lagusally lagg77, corr(ar1) pairwise ****Repeated cross-sectional regression. **Note: This will clear the rest of the dataset. **Dropped Political Terror as it was not significant and limits the range of years. rangestat (reg) idealpoint lagln_gdp_pc lagv2x_polyarchy laglngdppc_x_polyarchy lagln_pop lagsocialist_ideol lagkaopen laglnoil_pcgdp laglnobligations lagusally lagg77, interval(year 0 0) collapse b_lagg77 se_lagg77 reg_nobs, by(year) tsset year tsline b_lagg77 if tin(1970, 2015) generate critical_t = 2 replace critical_t = 1.99 if (reg_nobs-7) > 80 replace critical_t = 1.98 if (reg_nobs-7) > 120 gen ci_upper = b_lagg77+(critical_t*se_lagg77) gen ci_lower = b_lagg77-(critical_t*se_lagg77) tsline b_lagg77 ci_upper ci_lower if tin(1970, 2012), legend(order(1 "Estimated net effect, G77 membership")) lpattern(solid dash dash) lcolor(navy navy navy) ytitle(UN ideal point)