get data
/type = xlsx
/file = "d:\data\Survey Monkey 2013\Sheet_1_export_1.xlsx"
/sheet = name "Sheet_1_export_1"
/cellrange = full
/readnames = on.
* deleting variables that will not be needed.
delete variables collectorid startdate enddate ipaddress emailaddress firstname lastname customdata.
* renaming variables.
* renaming first four variables.
rename variables whatisyourgender = gender.
rename variables (WhatyearofschoolareyouinEnteranumberOpenEndedResponse
WhatisyourmajorOpenEndedResponse
DidyouattendanothercollegeuniversitybeforecomingtoUCLA =
yearschool major other_univ_s).
* renaming q5.
rename variables (HowdoyoustudyReadrewritenotesfromclass
HowdoyoustudyListentoarecordingofthelecture
HowdoyoustudyFindmoreinformationontheinternet
HowdoyoustudyReadtextassignedinclass
HowdoyoustudyReadtextsuggestedinclass
HowdoyoustudyWorkpracticeproblems
HowdoyoustudyDoassignedhomework
HowdoyoustudyHireatutor
HowdoyoustudyAttendstudysessionsleadbytheTA
HowdoyoustudyStudywithafriendorclassmate
HowdoyoustudyStudyinagroup
HowdoyoustudyGettipsfromsomeonewhotooktheclassinapreviousquarter
HowdoyoustudyOtherpleasespecify =
q5notes_s q5recording_s q5internet_s q5assigned_s q5suggested_s q5problems_s
q5homework_s q5tutor_s q5sessions_s q5friend_s q5group_s q5previous_s q5other).
* renaming q6.
rename variables Onaveragehowmanyhoursdoyoustudyforeachclassyoutake = hrs_study_s.
* renaming q7.
rename variables (Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Choo
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_A
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_B
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_C
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_D
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_E
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_F
Pleasetelluswhereyouprefertostudyandwhereyouactuallydostudy.Ch_G =
q7home_s
q7library_s
q7park_s
q7donutshop_s
q7otherhome_s
q7commonroom_s
q7coffee_s
q7other).
* renaming q8.
rename variables (WhatkindofnoiseleveldoyoupreferwhenstudyingPleaserankyouranswers
WhatkindofnoiseleveldoyoupreferwhenstudyingPleaserankyouranswe_A
WhatkindofnoiseleveldoyoupreferwhenstudyingPleaserankyouranswe_B
WhatkindofnoiseleveldoyoupreferwhenstudyingPleaserankyouranswe_C
WhatkindofnoiseleveldoyoupreferwhenstudyingPleaserankyouranswe_D =
q8silence_s
q8little_s
q8moderate_s
q8lots_s
q8nomatter_s).
* renaming q9.
rename variables (AtwhattimeofthedaydoyoudoyourmosteffectivestudyingChooseallthata
AtwhattimeofthedaydoyoudoyourmosteffectivestudyingChoosealltha_A
AtwhattimeofthedaydoyoudoyourmosteffectivestudyingChoosealltha_B
AtwhattimeofthedaydoyoudoyourmosteffectivestudyingChoosealltha_C
AtwhattimeofthedaydoyoudoyourmosteffectivestudyingChoosealltha_D =
q9any_s
q9morning_s
q9afternoon_s
q9evening_s
q9night_s).
* renaming q10.
rename variables Ifyoucouldchangeonethingtomakeyourstudyingmoreeffectivewhatwould = onechange.
* recoding variables.
* recoding the string variable other_univ_s into the numeric variable other_univ.
compute other_univ = $sysmis.
if other_univ_s = "No" other_univ = 0.
if other_univ_s = "Yes" other_univ = 1.
variable labels other_univ "Did you attend another college or university before coming to UCLA?".
value labels other_univ 0 "no" 1 "yes".
crosstabs
/tables other_univ_s by other_univ.
* recoding the string variable gender into the numeric variable female.
compute female = $sysmis.
if gender = "Female" female = 1.
if gender = "Male" female = 0.
variable labels female "gender of respondent".
value labels female 0 "male" 1 "female".
crosstabs
/tables gender by female.
* recoding q5 from string to numeric.
compute q5notes = $sysmis.
if q5notes_s = "Never" q5notes = 1.
if q5notes_s = "Rarely" q5notes = 2.
if q5notes_s = "Often" q5notes = 3.
if q5notes_s = "Always" q5notes = 4.
variable labels q5notes "Read/rewrite notes from class".
crosstabs
/tables q5notes_s by q5notes.
compute q5recording = $sysmis.
if q5recording_s = "Never" q5recording = 1.
if q5recording_s = "Rarely" q5recording = 2.
if q5recording_s = "Often" q5recording = 3.
if q5recording_s = "Always" q5recording = 4.
variable labels q5recording "Listen to a recording of the lecture".
crosstabs
/tables q5recording_s by q5recording.
compute q5internet = $sysmis.
if q5internet_s = "Never" q5internet = 1.
if q5internet_s = "Rarely" q5internet = 2.
if q5internet_s = "Often" q5internet = 3.
if q5internet_s = "Always" q5internet = 4.
variable labels q5internet "Find more information on the internet".
crosstabs
/tables q5internet_s by q5internet.
compute q5assigned = $sysmis.
if q5assigned_s = "Never" q5assigned = 1.
if q5assigned_s = "Rarely" q5assigned = 2.
if q5assigned_s = "Often" q5assigned = 3.
if q5assigned_s = "Always" q5assigned = 4.
variable labels q5assigned "Read text assigned in class".
crosstabs
/tables q5assigned_s by q5assigned.
compute q5suggested = $sysmis.
if q5suggested_s = "Never" q5suggested = 1.
if q5suggested_s = "Rarely" q5suggested = 2.
if q5suggested_s = "Often" q5suggested = 3.
if q5suggested_s = "Always" q5suggested = 4.
variable labels q5suggested "Read text suggested in class".
crosstabs
/tables q5suggested_s by q5suggested.
compute q5problems = $sysmis.
if q5problems_s = "Never" q5problems = 1.
if q5problems_s = "Rarely" q5problems = 2.
if q5problems_s = "Often" q5problems = 3.
if q5problems_s = "Always" q5problems = 4.
variable labels q5problems "Work practice problems".
crosstabs
/tables q5problems_s by q5problems.
compute q5homework = $sysmis.
if q5homework_s = "Never" q5homework = 1.
if q5homework_s = "Rarely" q5homework = 2.
if q5homework_s = "Often" q5homework = 3.
if q5homework_s = "Always" q5homework = 4.
variable labels q5homework "Do assigned homework".
crosstabs
/tables q5homework_s by q5homework.
compute q5tutor = $sysmis.
if q5tutor_s = "Never" q5tutor = 1.
if q5tutor_s = "Rarely" q5tutor = 2.
if q5tutor_s = "Often" q5tutor = 3.
if q5tutor_s = "Always" q5tutor = 4.
variable labels q5tutor "Hire a tutor".
crosstabs
/tables q5tutor_s by q5tutor.
compute q5sessions = $sysmis.
if q5sessions_s = "Never" q5sessions = 1.
if q5sessions_s = "Rarely" q5sessions = 2.
if q5sessions_s = "Often" q5sessions = 3.
if q5sessions_s = "Always" q5sessions = 4.
variable labels q5sessions "Attend study sessions lead by the TA".
crosstabs
/tables q5sessions_s by q5sessions.
compute q5friend = $sysmis.
if q5friend_s = "Never" q5friend = 1.
if q5friend_s = "Rarely" q5friend = 2.
if q5friend_s = "Often" q5friend = 3.
if q5friend_s = "Always" q5friend = 4.
variable labels q5friend "Study with a friend or classmate".
crosstabs
/tables q5friend_s by q5friend.
compute q5group = $sysmis.
if q5group_s = "Never" q5group = 1.
if q5group_s = "Rarely" q5group = 2.
if q5group_s = "Often" q5group = 3.
if q5group_s = "Always" q5group = 4.
variable labels q5group "Study in a group".
crosstabs
/tables q5group_s by q5group.
compute q5previous = $sysmis.
if q5previous_s = "Never" q5previous = 1.
if q5previous_s = "Rarely" q5previous = 2.
if q5previous_s = "Often" q5previous = 3.
if q5previous_s = "Always" q5previous = 4.
variable labels q5previous "Get tips from someone who took the class in a previous quarter".
crosstabs
/tables q5previous_s by q5previous.
variable labels q5other "Other (please specify)".
value labels q5notes to q5previous 1 "never" 2 "rarely" 3 "often" 4 "always".
* recoding the string variable hrs_study_s into the numeric variable hrs_study.
* notice that we cannot create code 4 because we don't know how it will appear in the data.
compute hrs_study = $sysmis.
if hrs_study_s = "0-5" hrs_study = 1.
if hrs_study_s = "41435" hrs_study = 2.
if hrs_study_s = "41593" hrs_study = 3.
if hrs_study_s = "More than 20" hrs_study = 5.
variable labels hrs_study "On average how many hours do you study for each class you take?".
value labels hrs_study 1 "0-5" 2 "6-10" 3 "11-15" 4 "16-20" 5 "more than 20".
exe.
crosstabs
/tables = hrs_study by hrs_study_s.
* making these variables into string variables so that we can treat them the same as the other variables for q7.
alter type q7park_s
q7donutshop_s
q7otherhome_s
q7other (A2).
* recoding q7.
compute q7home = $sysmis.
if q7home_s = "Prefer to study here:" q7home = 1.
if q7home_s = "Usually study here:" q7home = 0.
compute q7library = $sysmis.
if q7library_s = "Prefer to study here:" q7library = 1.
if q7library_s = "Usually study here:" q7library = 0.
compute q7park = $sysmis.
if q7park_s = "Prefer to study here:" q7park = 1.
if q7park_s = "Usually study here:" q7park = 0.
compute q7donutshop = $sysmis.
if q7donutshop_s = "Prefer to study here:" q7donutshop = 1.
if q7donutshop_s = "Usually study here:" q7donutshop = 0.
compute q7otherhome = $sysmis.
if q7otherhome_s = "Prefer to study here:" q7otherhome = 1.
if q7otherhome_s = "Usually study here:" q7otherhome = 0.
compute q7commonroom = $sysmis.
if q7commonroom_s = "Prefer to study here:" q7commonroom = 1.
if q7commonroom_s = "Usually study here:" q7commonroom = 0.
compute q7coffee = $sysmis.
if q7coffee_s = "Prefer to study here:" q7coffee = 1.
if q7coffee_s = "Usually study here:" q7coffee = 0.
variable labels q7home "Please tell us where you prefer to study and where you actually study: home".
variable labels q7library "Please tell us where you prefer to study and where you actually study: library".
variable labels q7park "Please tell us where you prefer to study and where you actually study: park".
variable labels q7donutshop "Please tell us where you prefer to study and where you actually study: donutshop".
variable labels q7otherhome "Please tell us where you prefer to study and where you actually study: someone else's home".
variable labels q7commonroom "Please tell us where you prefer to study and where you actually study: a common room".
variable labels q7coffee "Please tell us where you prefer to study and where you actually study: coffee shop".
variable labels q7other "Please tell us where you prefer to study and where you actually study: other".
value labels q7home to q7coffee 1 "Prefer to study here:" 0 "Usually study here:".
exe.
* recoding q8 from string to numeric.
compute q8silence = $sysmis.
if q8silence_s = "Strongly like" q8silence = 1.
if q8silence_s = "Like" q8silence = 2.
if q8silence_s = "Dislike" q8silence = 3.
if q8silence_s = "Strongly dislike" q8silence = 4.
variable labels q8silence "Absolute silence".
compute q8little = $sysmis.
if q8little_s = "Strongly like" q8little = 1.
if q8little_s = "Like" q8little = 2.
if q8little_s = "Dislike" q8little = 3.
if q8little_s = "Strongly dislike" q8little = 4.
variable labels q8little "A little background noise (such as soft music)".
compute q8moderate = $sysmis.
if q8moderate_s = "Strongly like" q8moderate = 1.
if q8moderate_s = "Like" q8moderate = 2.
if q8moderate_s = "Dislike" q8moderate = 3.
if q8moderate_s = "Strongly dislike" q8moderate = 4.
variable labels q8moderate "A moderate amount of background noise (such as a TV)".
compute q8lots = $sysmis.
if q8lots_s = "Strongly like" q8lots = 1.
if q8lots_s = "Like" q8lots = 2.
if q8lots_s = "Dislike" q8lots = 3.
if q8lots_s = "Strongly dislike" q8lots = 4.
variable labels q8lots "A lot of background noise (such as a party or concert)".
compute q8nomatter = $sysmis.
if q8nomatter_s = "Strongly like" q8nomatter = 1.
if q8nomatter_s = "Like" q8nomatter = 2.
if q8nomatter_s = "Dislike" q8nomatter = 3.
if q8nomatter_s = "Strongly dislike" q8nomatter = 4.
variable labels q8nomatter "The amount of background noise does not matter to me".
value labels q8silence to q8nomatter 1 "Strongly like" 2 "Like" 3 "Dislike" 4 "Strongly dislike".
crosstabs
/tables q8silence_s by q8silence
/tables q8little_s by q8little
/tables q8moderate_s by q8moderate
/tables q8lots_s by q8lots
/tables q8nomatter_s by q8nomatter.
* Notice that no respondent selected "afternoon", so that variable is actually a numeric variable in our dataset.
* We will use the alter type command to make the numeric variable a string variable so that we can handle it
like all of the other variables for this questionnaire item.
alter type q9afternoon_s (A1).
compute q9any = 0.
if q9any_s = "Any time that I have time to study" q9any = 1.
compute q9morning = 0.
if q9morning_s = "Morning" q9morning = 1.
compute q9afternoon = 0.
if q9afternoon_s = "Afternoon" q9afternoon = 1.
compute q9evening = 0.
if q9evening_s = "Evening" q9evening = 1.
compute q9night = 0.
if q9night_s = "Night" q9night = 1.
exe.
variable labels q9any "At what time of the day do you do your most effectives tudying: any time that I have time".
variable labels q9morning "At what time of the day do you do your most effectives tudying: morning".
variable labels q9afternoon "At what time of the day do you do your most effectives tudying: afternoon".
variable labels q9evening "At what time of the day do you do your most effectives tudying: evening".
variable labels q9night "At what time of the day do you do your most effectives tudying: night".
value labels q9any to q9night 0 "No" 1 "Yes".
* making q9 a single variable is a problem b/c respondents could (and did) choose more than one option.
* you can reduce it to a single variable based on substantive considerations or on number of options selected.
compute q9total = sum(q9any to q9night).
variable labels q9total "Total number of options selected".
freq var = q9total.
* need to create own codes for open-ended questions.
* the delete variables command does not take a wild card.
delete variables other_univ_s gender q5notes_s to q5previous_s hrs_study_s to q7coffee_s q8silence_s to q9night_s.
document These data were collected via Survey Monkey at www.surveymonkey.com/s/z3bxppp. Questions 2 and 9
are problematic. Some response options from question 5 and question 7 should be replaced. These data were extracted
using the advanced spreadsheet option.
* may want to have a keep subcommand to order the variables as you would like.
save outfile "D:\data\survey monkey 2013\advanced_spreadsheet_cleaned.sav"
/keep = RespondentID female yearschool major other_univ q5notes q5recording q5internet q5assigned q5suggested q5problems
q5homework q5tutor q5sessions q5friend q5group q5previous q5other hrs_study q7home q7library q7park q7donutshop q7otherhome
q7commonroom q7coffee q8silence q8little q8moderate q8lots q8nomatter q9any q9morning q9afternoon q9evening q9night q9total
onechange.
* data analysis.
* hypothesis 1: Do study habits differ between males and females?.
sort cases by female.
split file by female.
* getting descriptive statistics.
freq var = q9total.
means hrs_study.
* can include other analysis commands here.
split file off.
unianova hrs_study by female
/print = descriptive.
crosstabs
/tables female by q5notes q5recording q5internet q5assigned q5suggested q5problems q5homework q5tutor q5sessions q5friend
q5group q5previous.
* hypothesis 2: Do study habits change over time?.
crosstabs
/tables yearschool by q5notes q5recording q5internet q5assigned q5suggested q5problems
q5homework q5tutor q5sessions q5friend q5group q5previous.
crosstabs
/tables yearschool by hrs_study.
correlations yearschool hrs_study.
graph
/scatterplot(bivar) yearschool with hrs_study.
crosstabs
/tables yearschool by q7home q7library q7park q7donutshop q7otherhome q7commonroom q7coffee.
crosstabs
/tables yearschool by q8silence q8little q8moderate q8lots q8nomatter.
crosstabs
/tables yearschool by q9any q9morning q9afternoon q9evening q9night.
* hypothsis 3: Do study habits vary by major?.
crosstabs
/tables major by q5notes q5recording q5internet q5assigned q5suggested q5problems
q5homework q5tutor q5sessions q5friend q5group q5previous.
crosstabs
/tables major by hrs_study.
crosstabs
/tables major by q7home q7library q7park q7donutshop q7otherhome q7commonroom q7coffee.
crosstabs
/tables major by q8silence q8little q8moderate q8lots q8nomatter.
crosstabs
/tables major by q9any q9morning q9afternoon q9evening q9night.