| ***************************************** | |
| * This do-file replicates a research claim from Andrews & Money (2009) | |
| * "The Spatial Structure of Party Competition: Party Dispersion within a Finite Policy Space" | |
| * H*: On the economic policy dimension, the number of parties in the party system is positively associated with policy dispersion. | |
| * | |
| ***************************************** | |
| version 16.1 | |
| clear all | |
| cd "..." /*Change directory*/ | |
| *Start a log file | |
| local log_name "Andrews-Money_Replication" /*Give a name to the log where session is recorded*/ | |
| log using `log_name', replace | |
| *First, drop duplicates observations in "CPDS_final.dta" | |
| use "CPDS_final.dta", clear | |
| duplicates drop | |
| save "CPDS_temp.dta", replace | |
| *Merge the Comparative Manifesto Project (CMP) and the Comparative Political (CPDS) datasets generated by the file "ANDREWS code.R" | |
| use "CMP_final.dta", clear | |
| duplicates drop //Drop duplicates observations | |
| rename countryname country | |
| gen year = year(edate) | |
| tostring year, replace | |
| merge m:1 country year using "CPDS_temp.dta" | |
| erase "CPDS_temp.dta" //Delete intermediate file | |
| keep if _merge == 3 | |
| drop _merge | |
| destring year, replace | |
| *Generate an id for each country-election pair | |
| preserve | |
| keep country edate | |
| duplicates drop | |
| sort country edate | |
| by country: gen election = _n | |
| save "election_identifier.dta", replace | |
| restore | |
| *The replication uses all available observations | |
| ****************** Focal Independent Variable: Count of parties in system ****************** | |
| /*"To be included in our measure, a party must have gained at least 1 per cent of the seats | |
| in parliament in at least two consecutive elections. If a party fails to gain 1 per cent of the | |
| seats in three subsequent (and consecutive) elections, we drop it from our measure. | |
| According to this criterion, the number of parties in a party system is assessed on an | |
| election by election basis, and it can, in theory, change with each election." (page 810)*/ | |
| merge m:1 country edate using "election_identifier.dta" | |
| erase "election_identifier.dta" //Delete intermediate file | |
| xtset party election | |
| *Estimate the percentage of seats in parliament for each party | |
| gen relative_seat = absseat/totseats | |
| *Generate dummy equal to 1 if the party have gained at least 1 per cent of the seats in parliament in at least two consecutive elections. | |
| by party: gen relative_seat_t_1 = relative_seat[_n+1] | |
| gen consecutive_temp = relative_seat>0.01 & relative_seat_t_1>0.01 | |
| by party: egen consecutive = max(consecutive_temp) | |
| keep if consecutive == 1 | |
| drop consecutive consecutive_temp | |
| *Drop a party if it fails to gain 1 per cent of the seats in three subsequent (and consecutive) elections | |
| by party: gen relative_seat_t_2 = relative_seat[_n+2] | |
| gen consecutive_temp = relative_seat>0.01 & relative_seat_t_1>0.01 & relative_seat_t_2>0.01 | |
| by party: egen consecutive = max(consecutive_temp) | |
| keep if consecutive == 1 | |
| drop consecutive consecutive_temp | |
| *Number of parties in the system | |
| bysort country election: gen count_parties = _N | |
| sum count_parties, detail | |
| /*"Our two variables of interest – dispersion and number of parties in the party system | |
| – are both skewed. Therefore, we take the natural log of each | |
| variable and use these transformed variables in our regression analysis." (page 821)*/ | |
| replace count_parties = log(count_parties) | |
| *********** Dependent Variable: Distance between Extreme Parties (Dispersion) *********** | |
| /*Dependent Variable: Distance between Extreme Parties (Dispersion) along Economic Dimension | |
| "Our numerical estimates of party positions along each of our two dimensions correspond | |
| to the scores of the first component of a principal components analysis on each set | |
| of coding categories for the twenty countries included in our study. The end result of | |
| our analysis is an estimated policy position on the economic and social dimensions for | |
| each party in each election year from 1945 to 1999." (page 814) | |
| "The original Comparative Manifesto Project coding categories that are included in our economic | |
| policy dimension are: 303 (government and administrative efficiency), 401 (free enterprise), 402 (incentives), | |
| 403 (market regulation), 404 (economic planning), 407 (protectionism, negative), 412 (controlled | |
| economy), 413 (nationalization), 414 (economic orthodoxy), 504 (welfare state expansion), 505 (welfare | |
| state limitation), 701 (labor groups, positive)." (page 814) | |
| "To measure party dispersion, we calculate the distance between the policy positions of | |
| the two most extreme parties in the party system along both the economic and social | |
| policy dimensions, which results in a measure of dispersion for economic and social | |
| policy. We record dispersion for each party system depicted in Figure 1. The units of | |
| dispersion are determined by the principal components analysis and are comparable | |
| across party systems. (page 815-816)" | |
| */ | |
| *First, implement the principal components analysis | |
| pca per303 per401 per402 per403 per404 per407 per412 per413 per414 per504 per505 per701 | |
| predict economic_policy, score //Predict principal component (factor) score for the first component for each party | |
| *Second, identify the most extreme parties in each country-election pair | |
| bysort country election: egen min = min(economic_policy) | |
| bysort country election: egen max = max(economic_policy) | |
| *Generate the distance between the policy positions of the two most extreme parties | |
| gen dispersion = max - min | |
| sum dispersion, detail | |
| /*"Our two variables of interest – dispersion and number of parties in the party system | |
| – are both skewed. Therefore, we take the natural log of each | |
| variable and use these transformed variables in our regression analysis." (page 821)*/ | |
| replace dispersion = log(dispersion) | |
| ************************ Other controls ************************ | |
| *1) Single member district systems | |
| /*In Models 1 (a & b) and 2 (a & b), we evaluate the effect of number of parties | |
| in the system, as measured by count of parties and by effective number of parties, and | |
| electoral rules, as measured by a dummy variable coded 1 if the country has a single | |
| member district electoral system, on dispersion. (page 821)*/ | |
| gen single_member = (prop == 0) | |
| replace single_member = . if prop == . | |
| *2) Lagged log dependent variable | |
| /*"Because past dispersion is likely to affect current dispersion, we | |
| include the lagged dependent variable in each regression." (page 821)*/ | |
| *Keep an unique observation for country-election | |
| keep dispersion count_parties country edate single_member year election data_sample | |
| duplicates drop | |
| *Generate a numeric id for the country | |
| egen id_country = group(country) | |
| *Declare panel | |
| xtset id_country election | |
| *Generate lagged log dependent variable | |
| by id_country: gen lagged_dispersion = L.dispersion | |
| ************************ Test of the SCORE claim, H* ************************ | |
| /*In Models 1 (a & b) and 2 (a & b), we evaluate the effect of number of parties | |
| in the system, as measured by count of parties and by effective number of parties, and | |
| electoral rules, as measured by a dummy variable coded 1 if the country has a single | |
| member district electoral system, on dispersion. (page 821) | |
| "In addition, to account for country-specific variance, we cluster our observations by country" (page 821)*/ | |
| *Focal replication analysis | |
| *Uses all the available observations | |
| reg dispersion count_parties single_member lagged_dispersion, cluster(id_country) | |
| *Close log | |
| log close | |
| *Create PDF from log | |
| translate `log_name'.smcl `log_name'.pdf, replace | |
| display `End of Do-file' |