From Survey to Data to Analysis Providing Social Science Data Services Jim Jacobs, 2008
The Survey Instument Survey instrument Q1. [enter zip code ] Q2. [enter R’s first name ] Q3. [enter sex of R ] Q4. What was your major in College? Q5. What was your income last year? Q6. Did you go to church last week?
Answers to Questions Zip Name Sex Major income church Wilma F lit 0 y Barney M engin 10 n Betty F. 0 n Ethel F theater 1000 y Fred M. M PE y Lucy F lit 700 y Ricky M music y Fred A. M dance n Ginger F math 9500 y
Must anonymize the data! Zip Name Sex Major income church Wilma F lit 0 y Barney M engin 10 n Betty F. 0 n Ethel F theater 1000 y Fred M. M PE y Lucy F lit 700 y Ricky M music y Fred A. M dance n Ginger F math 9500 y
Must anonymize the data! Zip Name Sex Major income church F lit 0 y M engin 10 n F. 0 n F theater 1000 y M PE y F lit 700 y M music y M dance n F math 9500 y
Change Text to Numeric Codes Zip Name Sex Major income church F lit 0 y M engin 10 n F. 0 n F theater 1000 y M PE y F lit 700 y M music y M dance n F math 9500 y
Change Text to Numeric Codes Zip Name Sex Major income church lit 0 y engin 10 n n theater 1000 y PE y lit 700 y music y dance n math 9500 y
Change Text to Numeric Codes Zip Name Sex Major income church lit 0 y engin 10 n n theater 1000 y PE y lit 700 y music y dance n math 9500 y The “codebook” must document the numeric codes used! For example: Variable: “sex” 1 = female 2 = male
Change Text to Numeric Codes Zip Name Sex Major income church lit 0 y engin 10 n n theater 1000 y PE y lit 700 y music y dance n math 9500 y
Change Text to Numeric Codes Zip Name Sex Major income church y engin 10 n n theater 1000 y PE y y music y dance n math 9500 y
Change Text to Numeric Codes Zip Name Sex Major income church y n n y y y y n y
Change Text to Numeric Codes Zip Name Sex Major income church y n n y y y y n y
Change Text to Numeric Codes Zip Name Sex Major income church
Change Text to Numeric Codes Zip Name Sex Major income church Sometimes, even numeric variables are encoded in ranges. For example: Variable: “income” 1 = less than = = = more than = not reported
Change Text to Numeric Codes Zip Name Sex Major income church Sometimes, even numeric variables are encoded in ranges. For example: Variable: “income” 1 = less than = = = more than = not reported
Data Files do not need “headers” Zip Name Sex Major income church
Data Files do not need “headers”
Data Files do not need extra space
Data Files do not need extra space
Data Files do not need extra space
Data Files do not need extra space
Data Files do not need extra space
Codebook must document locations For example: Variable: “sex” location: column 9 width: 1
Codebook must document locations For example: Variable: “sex” location: column 9 width:
Codebook documents question, location, codes For example: Q3. [enter sex of R ] Variable: “sex” location: column 9 width: 1 Variable: “sex” 1 = female 2 = male
Aggregating Microdata Zip Name Sex Major income church Wilma F lit 0 y Barney M engin 10 n Betty F. 0 n Ethel F theater 1000 y Fred M. M PE y Lucy F lit 700 y Ricky M music y Fred A. M dance n Ginger F math 9500 y
Aggregating Microdata Zip Name Sex Major income church 2 Wilma F lit 0 y 9 Barney M engin 10 n 9 Betty F. 0 n 9 Ethel F theater 1000 y 1 Fred M. M PE y 1 Lucy F lit 700 y 2 Ricky M music y 2 Fred A. M dance n 1 Ginger F math 9500 y
Aggregating Microdata Zip Name Sex Major income church 1 Fred M. M PE y 1 Ginger F math 9500 y 1 Lucy F lit 700 y 2 Fred A. M dance n 2 Ricky M music y 2 Wilma F lit 0 y 9 Barney M engin 10 n 9 Betty F. 0 n 9 Ethel F theater 1000 y
Aggregating Microdata Zip Sex 1 M 1 F 2 M 2 F 9 M 9 F
Aggregating Microdata Zip Sex Male Female 1 M F 2 M M 2 F 9 M F
Aggregating Microdata Geo Sex Male Female
Aggregating Microdata Geo Sex Male Female
Aggregate Data