title1 "Supreme Court Polarization Research";
title2 "Segal/Cover/Martin Scores by Justice";
title3 "Donald M. Gooch";
title4 "Spring 2012 - Job Talk";
data court; infile "C:\Users\goochdm\Documents\RESEARCH\Supreme Court Research\measures4.csv" lrecl = 200 DSD;
input justice term mqScore scQual scIdeology x;
label justice = "Supreme Court Justice Identification Number"
term = "USSC term"
mqScore = "Martin / Quinn Ideological Score"
scQual = "Segal / Cover Qualification Score"
scIdeology = "Segal / Cover Ideology Score"
;
if term > 1929 and term < 1940 then decade = 1930;
if term > 1939 and term < 1950 then decade = 1940;
if term > 1949 and term < 1960 then decade = 1950;
if term > 1959 and term < 1970 then decade = 1960;
if term > 1969 and term < 1980 then decade = 1970;
if term > 1979 and term < 1990 then decade = 1980;
if term > 1989 and term < 2000 then decade = 1990;
if term > 1999 and term < 2010 then decade = 2000;
if term > 1969 and term < 1990 then half = 7080;
if term > 1989 and term < 2010 then half = 9020;
/*
mqScore_dev = abs(mqScore - );
mqScore_absdev = abs(scIdeology - 0);
scQual_dev = abs( - scIdeology);
scQual_absdev = abs(scQual - 0);
*/
if justice = 99 then justice = .;
if term = 99 then term = .;
if mqScore = 99 then mqScore = .;
if scQual = 99 then scQual = .;
if scIdeology = 99 then scIdeology =.;
data court; set court;
proc corr data = court;
var mqscore scideology;
run;
proc contents;
run;
proc means;
run;
data court; set court;
if decade = . then delete;
proc sort data = court;
by term;
run;
*proc means data = court;
*by term;
*run;
proc univariate data = court;
by term;
var mqScore scIdeology;
run;
proc sort data = court;
by decade;
run;
*proc means data = court;
*by decade;
*run;
proc univariate data = court;
by decade;
var mqScore scIdeology;
run;
/*
data court2; set court;
if half = . then delete;
proc sort data = court2;
by half;
run;
proc means data = court2;
by half;
run;
proc univariate data = court all;
by half;
var mqScore scIdeology;
run;
proc ttest H0 = 0 ALPHA = .05 data = court;
CLASS half;
var mqScore scIdeology;
run;