Statistical Modeling

Dr. Courtney Brown

Assignment #2

In this assignment, you will again analyze the on-year and off-year pattern of political participation in voting during U.S. congressional elections. Keep focused on the idea that you have to use the normal English language to explain the statistics. Keep the writing in your essay clear. In this case, you will conduct and evaluate t-tests to test for the differences between means. You are to examine differences in congressional mobilization using the periods from 1932-1970 and 1972-1988. Think about why these two periods are useful, and especially why you may want to begin in 1932 for the first period. The program below is set-up to analyze total congressional mobilization. But also look at total Republican congressional mobilization and total Democratic congressional mobilization. Look at all three when you compare the two periods. Use the same data set that you used for the last assignment.

Below is the SAS code that will do the analysis of the data. Cut and paste everything below this line into your SAS editor. You may need to change the drive letter on the first line. Also, you will need to re-run this analysis for the Republican case and the Democratic case using the variables MRCONG and MDCONG respectively.

libname windata 'e:\';
GOPTIONS lfactor=10 hsize=6 in vsize=6 in horigin=1 in vorigin=1 in;
options nocenter;
**********************************************************;
* CLASS, NOTE THAT IF YOU BEGIN A LINE WITH AN ASTERISK *
* THEN YOU CAN PUT NOTES IN YOUR PROGRAM FILES. THIS IS
* LIKE A COMMENT CARD IN SPSS. HOWEVER, REMEMBER
* TO EVENTUALLY PUT A FINAL SEMICOLON AT THE END OF YOUR COMMENTS.;
***********************************************************;
* NOTE THAT I INDENT SOME STATEMENTS. THIS
* IS JUST FOR NEATNESS.;
***********************************************************;
* COPYRIGHT (c) Courtney Brown 2005, All Rights Reserved;
* Permission granted to use this file and computer code for any nonprofit and
* educational purposes, including classroom instruction.
* No further permission required.
* Please cite source as "From www.courtneybrown.com";
***********************************************************;
DATA USPARTY;SET windata.USPARTY;
IF (YEAR LE 1930) THEN PERIOD=1;
IF ((YEAR GE 1932) AND (YEAR LE 1970)) THEN PERIOD=2;
IF ((YEAR GE 1972) AND (YEAR LE 1988)) THEN PERIOD=3;
DATA ONYEAR;SET USPARTY;
IF (ON = 1);
IF (PERIOD NE 1);
DATA OFFYEAR;SET USPARTY;
IF (ON = 0);
IF (PERIOD NE 1);
proc print DATA=ONYEAR;var year period mtotcong ON;
proc print DATA=OFFYEAR;var year period mtotcong ON;
DATA ONYEAR;SET ONYEAR;
PROC SORT;BY PERIOD;
PROC MEANS; VAR YEAR PERIOD MTOTCONG ON;
BY PERIOD;
TITLE "ON-YEAR ELECTIONS";
PROC TTEST;
CLASS PERIOD;
VAR MTOTCONG;
DATA OFFYEAR;SET OFFYEAR;
PROC SORT;BY PERIOD;
PROC MEANS; VAR YEAR PERIOD MTOTCONG ON;
BY PERIOD;
TITLE "OFF-YEAR ELECTIONS";
PROC TTEST;
CLASS PERIOD;
VAR MTOTCONG;
run;
quit;