University of Louisiana at Lafayette
Computing Support Services

Survey FAQ

SELF-HELP GUIDES > STATISTICS > SAS

Contents
Introduction

This FAQ discusses some issues you need to consider when you conduct a survey: survey design, data entry, and data analysis. This FAQ is only a starting point. Books have been written on designing and analyzing surveys. This FAQ acquaints you with some of the issues. Contact the UCSS Statistical Software Consultant for additional information.

Back to Contents

Survey Design Tips
  • When you conduct a survey, typically you get responses like "yes" "no" and "no response". Instead of working with these actual responses, assign numerical values to each possible response and work with numerical data.
Assign Values
Survey Answer Numerical Value
No 1
Yes 2
No Response 9
  • Ask questions that can be answered with a few responses for each question and code up all possible responses (including missing). For example, you might ask "Who did you vote for in the last presidential election?" and make a table of possible responses.
All Possible Responses
Survey Answer Numerical Value
Bush 1
Gore 2
Nader 3
Other 4
Did not vote 5
Refused to answer 6
Missing (no response) 9
  • Do not ask open ended questions such as "What are the three things you like best about UL Lafayette?" You might get one hundred different answers from one hundred people.

  • Assign a unique ID to each respondent. After you code and enter the data, you might find that you typed the age of a college respondent as 3 years old. If each respondent has a unique ID, you can backtrack from the data for that unique ID to the actual responses for that unique ID and fix the data error.

  • Suppose you will conduct a survey of 150 students. You will record their gender and response to two questions "Did you read a newspaper yesterday?" and "Did you watch the news on television yesterday?" The answers can be yes or no.

  • Make a code book similar to the following for the layout of the data file. Variable Names should be 8 characters or less. Under the Possible Values column put all possible values. The last two columns are used to decide the actual layout of the data in the data file.
Code Book
Variable Name Possible Values
ID values 1 to 150
GENDER 1=male 2=female 9=missing
Q1 1=yes 2=no 9=missing
Q2 1=yes 2=no 9=missing
  • Prepare the code book before you conduct the survey. You might have to modify some survey questions. Suppose you are conducting a survey of exercise habits. Originally, you think you should have a question "How many many hours a month do you exercise?" and let the respondent answer with the number of hours. You realize that this will give you too many possible responses and restrict the responses to "Less than five hours", "Between five and ten hours", "Between ten and fifteen hours" and so on.

  • If you are surveying a sample, be sure the sample is random and representative of the population. For example, if you are surveying public high school principals in Louisiana, do not send your survey to only principals in Orleans parish. Consult one of the books written on designing and analyzing surveys for more information on this topic.

Back to Contents

Data Entry

You need to input the data into the computer. Your options include:

  • You can use SPSS for Windows on UCS. When you start SPSS, you will see a Data Editor (spreadsheet) window. Type the data into the spreadsheet, and analyze the data using the pull-down menus.

  • You can enter the data into a spreadsheet on your personal computer and save the file as a comma delimited file. Then you will write an SPSS or SAS program to analyze the data on UCS.

  • You can put the responses on Scantron sheets and read the data using the Scantron machine in Stephens Hall. Contact the UCSS Statistical Software Consultant for more information on this option.

Back to Contents

Data Analysis

You can use SAS or SPSS to analyze your data. The selection of one or the other is a matter of personal preference. SAS and SPSS are both on UCS. If you use SPSS, you can enter your data in the Data Editor (spreadsheet) window and analyze your data using the pull-down menus. You can also write a simple SPSS program to read and analyze the data. If you use SAS, you will need to write a simple SAS program to read and analyze the data.

Some tips:

  • Use variable labels and value labels (SPSS) or formats (SAS) in your program so all output tables are completely described. Each SPSS statement ends with a period. Each SAS statement ends with a semicolon.

  • Run frequencies of all variables first. This allows you to validate your data. For example, if the possible responses for gender are 1 for male, 2 for female, and 9 for missing, then if you have a response of 6, you know you have an error in your data entry. Possibly the data was copied incorrectly. Fix all data entry errors and rerun frequencies.

  • Examine the output of frequencies to learn more about your data. Suppose three-fourths of your survey respondents are male. Your survey results might be biased if you have asked the question "Should women sports teams receive the same amount of money as men sports teams?"

  • Continue with any further analyses (such as crosstabs).

Back to Contents

Sample SPSS program for survey of 150 students

     * data in comma delimited file.
     * missing data is coded as 9.     
     title Survey of newspaper and television news.
     data list file='survey.dat' free records=1
        / id  gender  q1-q2 .
     variable labels
        id 'respondent ID'
        q1 'read newspaper?'
        q2 'watched television?' .
     value labels
        gender 1='male' 2='female' 9='missing' /
        q1 to q2 1='yes' 2='no' 9='missing' .
     missing values gender to q2 (9) .
     frequencies variables=all .

Back to Contents

Sample SAS program for survey of 150 students

     /* data in comma delimited file */
     /* missing data is blank */ 
     proc format;
        value labone 1='male' 2='female';
        value labtwo 1='yes' 2='no';
     data survey;
        infile 'survey.dat' dsd missover;
        input id 1-3 gender 4 q1 5 q2 6;
        format gender labone. q1--q2 labtwo.;
        label id = 'respondent ID'
           q1 = 'read newspaper?'
           q2 = 'watched television?'
     proc freq;
        tables id--q2;
        title 'Survey of newspaper and television news';
		  run;
Back to Contents
 
Additional Information
For additional information on any of these topics, contact the Help Desk,
Stephens Hall 201; 482-5516.



© Copyright 2002 by the University of Louisiana at Lafayette
Computing Support Servicees, P.O. Box 42770, Lafayette LA 70504
Phone: 337/482-5516 · E-Mail: helpdesk@louisiana.edu