Setting up your database And codebook
What is a codebook? It is a description of all your variables How they were created How they are scored Includes actual variable names It is very useful
Codebook QuestionVariableVariable Name in SPSS ScoringRange How old are you? Age Years and months, Based on responses 18.4 –19.8 What sex are you? Sex 0=male; 1=female 0-1 How often do you use marijuana each month How oft MJ mos mjfreqmo0=never 1=sometimes 2=often 3=daily 0-3 Total of other questions Total marijuana use mjtotMjfreqmo + mjfreqda+mjfre qyr 0-12
Naming Variables Must be unique Must start with a letter Can’t include symbols Can’t include certain command words Can’t be more than 64 characters – Should NOT be more than 8 characters
Variables? We will only be using variables in a numeric format We will not use “string” variables Thus all variables, including gender, must be assigned numbers Even if those numbers aren’t meaningful
What about missing data Label it numerically I recommend using 999