/****************************************************** * CODE TO PRODUCE ALL ANALYSES IN THE PAPER * * "PLACING POLITICAL PARTIES IN POLICY SPACES" * * by Michael Laver, Kenneth Benoit, and John Garry * * * * Requires: * * * * Stata with the wordscore library installed * * (available from * * net http://www.politics.tcd.ie/wordscore * * The following Data files: * * APSR_example.dta * * APSR_uk9297.dta * * APSR_ie9297.dta * * APSR_de9094.dta * * APSR_uk9701.dta * ******************************************************/ net install http://www.politics.tcd.ie/wordscores/wordscores version 7.0 clear all capture log close log using APSR_wordscores.log, replace /**************** * TABLE 1 * * Sample data * ****************/ use http://www.tcd.ie/Political_Science/wordscores/files/APSR_example rename r1 tr1 rename r2 tr2 rename r3 tr3 rename r4 tr4 rename r5 tr5 rename v tv setref tr1 -1.50 tr2 -0.75 tr3 0.00 tr4 0.75 tr5 1.50 wordscore example textscore example tv /* list the scores of each word on the "dimension" EXAMPLE */ set more off list word example /**************** * TABLE 2 * * UK 1992-1997 * ****************/ use http://www.tcd.ie/Political_Science/wordscores/files/APSR_uk9297, clear /* load word count data */ ren lab92 tlab92 ren lab97 tlab97 ren con92 tcon92 ren con97 tcon97 ren ld92 tld92 ren ld97 tld97 setref tlab92 5.35 tld92 8.21 tcon92 17.21 /* set ref. scores/texts 1992 */ describetext t* /* descriptive stats on texts */ wordscore economy /* score words for econ */ textscore economy t*97 /* score virgin texts 1997 */ /**************** * TABLE 4 * * UK 1992-1997 * ****************/ setref tlab92 6.53 tld92 6.87 tcon92 15.34 /* now set ref scores social 92 */ describetext t* /* descriptive stats reflect new reference scores */ wordscore social /* score words for social */ textscore social tlab97 tld97 tcon97 /* score virgin texts 1997 */ /**************** * TABLE 3 * * IE 1992-1997 * ****************/ clear; #delimit ; /* use delimiter to end commands */ set mem 128m; /* increase memory space to 128 MB */ use http://www.tcd.ie/Political_Science/wordscores/files/APSR_ie9297; /* load Ireland 92, 97 wordcounts */ ren ff92 tff92; ren ff97 tff97; ren fg92 tfg92; ren fg97 tfg97; ren lab92 tlab92; ren lab97 tlab97; ren pd92 tpd92; ren pd97 tpd97; ren dl92 tdl92; ren dl97 tdl97; setref tff92 13.13 /* set economic reference scores */ tfg92 15.00 tlab92 6.88 tpd92 17.63 tdl92 4.50 ; wordscore economy; textscore economy t*97; /**************** * TABLE 5 * * IE 1992-1997 * ****************/ setref tff92 17.5 /* set social reference scores */ tfg92 13.71 tlab92 6.0 tpd92 9.43 tdl92 3.5 ; wordscore social; textscore social t*97; /**************** * TABLE 6 * * DE 1990-1994 * ****************/ use http://www.tcd.ie/Political_Science/wordscores/files/APSR_de9094, clear; ren pds90 tpds90; ren pds94 tpds94; ren green90 tgreen90; ren green94 tgreen94; ren spd90 tspd90; ren spd94 tspd94; ren fdp90 tfdp90; ren fdp94 tfdp94; ren cdu90 tcdu90; ren cdu94 tcdu94; setref tgreen90 5.21 tspd90 6.53 tfdp90 15.68 tcdu90 13.53 ; wordscore economic; /* Economic scoring PDS 1990 */ textscore economic tpds90 tgreen94 tspd94 tfdp94 tcdu94; /* Economic scoring PDS 1994 */ textscore economic tpds94 tgreen94 tspd94 tfdp94 tcdu94; setref tpds90 4.19 tgreen90 5.21 tspd90 6.53 tfdp90 15.68 tcdu90 13.53 ; textscore economic tpds94 tgreen94 tspd94 tfdp94 tcdu94; /* Now try a "bootstrapped" method for estimating * the 1994 PDS score, using the virgin score of PDS 1990 * as a reference score for this text */ setref tgreen90 2.90 tspd90 6.68 tfdp90 6.84 tcdu90 14.42 ; wordscore social; /* Social scoring PDS 1990 */ textscore social tpds90 tgreen94 tspd94 tfdp94 tcdu94; /* Social scoring PDS 1994 */ textscore social tpds94 tgreen94 tspd94 tfdp94 tcdu94; /******************* * TABLE 7 * * 1991 IE DEBATE * *******************/ use http://www.tcd.ie/Political_Science/wordscores/files/IPS_speeches, clear; table partypos, c(n raw mean raw sd raw mean std sd std) format(%8.4f); /******************* * FIGURE 3 * * 1991 IE DEBATE * *******************/ include http://www.tcd.ie/Political_Science/wordscores/files/hbox.ado; sort ppos; hbox std, by(ppos) qsort(-med) shown xlabel(-1.50(.75)3.00) xscale(-1.5,3.0) t1("Standardised Score on Anti- v. Pro- Government Dimension") title(" ") flipt; log close;