171 likes | 437 Views
The Art of Coding Variables and Creating Codebooks and Databases for Statistical Analysis. Survey of Statistical Methods Friday, January 21, 2005. What is a Data Codebook?. Contents of a Data Codebook. A blank copy of each of your ‘data forms’
E N D
The Art of Coding Variables and Creating Codebooks and Databases for Statistical Analysis Survey of Statistical Methods Friday, January 21, 2005
What is a Data Codebook? Contents of a Data Codebook • A blank copy of each of your ‘data forms’ • A copy of your data form with the variable names noted on it • A copy of your ‘data coding system’ that summarizes the properties of your variables • A copy of your data (printed after all data is entered)
Steps for Data Coding • Collect all data on a “data form”. All data for a subject should be centralized • Create a subject ID system and write ID on each form for every subject • Write variable names on a blank ‘data form’ • Create a coding summary in Word or EXCEL • Create database in SPSS
Data ‘Forms’ Create an ID numbering system. Write variable names on a blank questionnaire. Create Codebook in Word or EXCEL
Information that must be in your coding sheet • Variable name (**** see ‘rules’ for naming variables) • Type of variable (number or text.. if text, max size) • Short description (called Variable Label) • Unit of measure • Value labels (if variable is categorical) • Minimum and maximum values • Designating ‘missing values’ (when appropriate)
Rules for Creating Variable Names • Maximum of 8 characters with no spaces. • The name must begin with a letter. The remaining characters can be any letter, any digit, a period, or the symbols @, #, _, or $. • Can not end with a period or an underscore (_). • Can not use special characters(e.g., !, ?, ’, and *) • Each variable name must be unique; duplication is not allowed. Variable names arenot case sensitive. The names NEWVAR, NewVar, and newvar are all considered identical.
Creating a database in SPSS • SPSS = “Statistical Package for the Social Sciences” • Open SPSS for Windows (do not use xxxx) • Close the initial window that appears (press Cancel)
Homework for Friday(1/28/05) • Code the variables and create a codebook and database for the “Sample Questionnaire” • You will be handing in your work in the following form… (staple all pages together) • Cover page with your name, assignment title, date, and an appropriate graphic. • Copy of the sample questionnaire with variable names you selected hand written on it. • The “Codebook” (created in WORD or EXCEL). • A screen print of the Variable View worksheet from SPSS containing your database. • A screen print of the Data View worksheet with data for 3 subjects (use your data + data from 2 other people in class).
SPSS Help • Variable View Tab • This is where you establish the variable names and enter information from your codebook. • Be sure that your first variable is an IDNO and be sure to number your data sheets. • Data View Tab • This is where you enter the actual numbers from your data sheets. Each row represents one subject.