* Encoding: UTF-8. **************************This syntax will recode the raw data for the alcohol shopper lab study and bring it into SPSS. It will also create all outcome variables for analysis. **************************The syntax was created by KD (Bristol University) on 03/03/2020. **************************The syntax was checked and edited by NC (Cambridge University) on 05/03/2020 **************************399 participants are included in the dataset. Missing data are labelled below per outcome variable. *******************************************to open data (use own file name)************************************************* GET DATA /TYPE=XLSX /FILE='ShopperLabStudy_OriginalDatabase_v1.0_20200421' /SHEET=name 'Sheet1' /CELLRANGE=FULL /READNAMES=ON /DATATYPEMIN PERCENTAGE=95.0 /HIDDEN IGNORE=YES. EXECUTE. DATASET NAME DataSet1 WINDOW=FRONT. ****************************************to label variables********************************** ***to label study condition*** AUTORECODE VARIABLES=Condition /INTO Condition_1_3 /PRINT. value labels Condition_1_3 1 "Image+text" 2 "Text only" 3 "Control". EXECUTE. ***labels for other variables*** VARIABLE LABELS HWL1 "Number of alcoholic drinks displaying HWL 1". VARIABLE LABELS HWL2 "Number of alcoholic drinks displaying HWL 2". VARIABLE LABELS HWL3 "Number of alcoholic drinks displaying HWL 3". VARIABLE LABELS HWL4 "Number of alcoholic drinks displaying HWL 4". VARIABLE LABELS HWL5 "Number of alcoholic drinks displaying HWL 5". VARIABLE LABELS HWL6 "Number of alcoholic drinks displaying HWL 6". VARIABLE LABELS Totalspend2 "Total spend (food plus drink)". VARIABLE LABELS Totalspenddrinks3 "Drink total spend". VARIABLE LABELS Totalspendfood4 "Food total spend". ***set variables to scale*** VARIABLE level Totalnumberofalcoholfreedrinksselected (SCALE). VARIABLE level Totalnumberofsoftdrinksselected (SCALE). VARIABLE level Totalnumberofalcoholicdrinksselected (SCALE). VARIABLE level Totalnumberofdrinksselected (SCALE). VARIABLE level ParticipantID (Nominal). ***auto recode*** AUTORECODE VARIABLES=SecondaryoutcomeSelectedalcohol /INTO Selectedalcohol /PRINT. AUTORECODE VARIABLES=Postshoppingtaskquestion3 /INTO Postshoppingtaskquestion_3 /BLANK=MISSING /PRINT. *** more labels*** VARIABLE LABELS Postshoppingtaskquestion_3 "Did you notice any labels on the products?". VARIABLE LABELS Postshoppingtaskquestion2 "If so, can you describe the labels you saw?". RENAME VARIABLES NEAMEANAVERAGETEXTONLY = NEAMEANAVERAGE_TEXTONLY. RENAME VARIABLES AcceptabilityTEXTONLY = Acceptability_TEXTONLY. RENAME VARIABLES NEAMEANAVERAGEIMAGEampTEXT = NEAMEANAVERAGE_IMAGEandTEXT. RENAME VARIABLES AcceptabilityIMAGEampTEXT = Acceptability_IMAGEandTEXT. ***code demographics*** VALUE LABELS Gender 1 "Male" 2 "Female" 3 "Other" 4 "Prefer not to say". EXECUTE. VALUE LABELS Ethnicity 1 "White British / White Irish / Other White background" 2 "Mixed White and Black African / Mixed White and Asian / Mixed White and Black Caribbean / Other Mixed background" 3 "Asian/Asian British (Indian/Pakistani/Bangladeshi/Chinese/Other Asian/Asian British background)" 4 "Black/Black British (African/Caribbean/Other Black/Black British background)" 5 "Other ethnic group" 6 "Prefer not to say". EXECUTE. VALUE LABELS BMIcategory 1 "Underweight" 2 "Healthy weight" 3 "Overweight" 4 "Obese" 5 "Severely obese" 6 "Morbidly obese". EXECUTE. VALUE LABELS Highestqualification 1 "No qualifications" 2 "Up to 4 GCSE" 3 "5 or more GCSE's or 1 A-level" 4 "2 or more A-levels" 5 "Bachelor's degree" 6 "Post-Graduate degree or qualification". EXECUTE. ***code drinking questions*** VARIABLE LABELS AUDITQ1 "How often do you have a drink containing alcohol?". VARIABLE LABELS AUDITQ2 "How many units of alcohol do you drink on a typical day when you are drinking?". VARIABLE LABELS AUDITQ3 "How often have you had 6 or more units if female, or 8 or more if male, on a single occasion in the last year?". VALUE LABELS AUDITQ1 0 "Never" 1 "Monthly or less" 2 "2-4 times per month" 3 "2-3 times per week" 4 "4+ times per week". EXECUTE. VALUE LABELS AUDITQ2 0 "1-2" 1 "3-4" 2 "5-6" 3 "7-9" 4 "10+". EXECUTE. VALUE LABELS AUDITQ3 0 "Never" 1 "Less than monthly" 2 "Monthly" 3 "Weekly" 4 "Daily or almost daily". EXECUTE. VARIABLE LABELS Weeklyalcoholconsumed "How much alcohol consumed in a typical week (units)". VARIABLE LABELS Weeklyalcoholpurchased "How much alcohol purchased in a typical week (units)". VALUE LABELS Weeklyconsumptioncategory 1 "0-14" 2 "15-30" 3 "31-50" 4 "50+". EXECUTE. VARIABLE LABELS Debriefquestion1 "What do you think the study is about?". VARIABLE LABELS Debriefquestion2 "What do you think the aim of the research is?". VARIABLE LABELS Debriefquestion3 "Do you have any further comments about the labels?". VARIABLE LABELS Debriefquestion4 "Do you have any further comments?". VARIABLE LABELS Screeningquestion1 "How often do you drink / eat the following: Wine". VARIABLE LABELS Screeningquestion2 "How often do you drink / eat the following: Beer". VARIABLE LABELS Screeningquestion3 "How often do you purchase supermarket products (i.e. food and drink)?". VARIABLE LABELS Screeningquestion4 "How often do you shop in a physical supermarket store?". VARIABLE LABELS Debriefquestion5 "How typical was the shop 1 (not at all typical) – 10 (very typical)". VARIABLE LABELS Debriefquestion6 "External validity free text response". ***************************************to compute new variables******************************* ***Weekday / weekend*** AUTORECODE VARIABLES=Day /INTO Day1 /PRINT. IF (Day1 = 1) or (Day1 = 2) or (Day1 = 4) or (Day1 = 5) or (Day1 = 6) Weekday_weekend = 0. IF (Day1 = 3) Weekday_weekend = 1. VALUE LABELS Weekday_weekend 0 "Weekday" 1 "Weekend". EXECUTE. *check recode* CROSSTABS /TABLES=Day BY Weekday_weekend /FORMAT=AVALUE TABLES /CELLS=COUNT /COUNT ROUND CELL. ***Time*** COMPUTE Time_recode=XDATE.HOUR(Time). VARIABLE LABELS Time_recode "Time recoded (only used for recoding Morning_afternoon var)". VARIABLE LEVEL Time_recode(SCALE). FORMATS Time_recode(F8.0). VARIABLE WIDTH Time_recode(8). EXECUTE. If Time_recode <12 Morning_afternoon = 1. If Time_recode >=12 Morning_afternoon = 2. VALUE LABELS Morning_afternoon 1 "Morning" 2 "Afternoon". EXECUTE. *check recode* CROSSTABS /TABLES=Time BY Morning_afternoon /FORMAT=AVALUE TABLES /CELLS=COUNT /COUNT ROUND CELL. ********************************** *****primary outcome************************************** ***to compute the primary outcome (Proportion of total drinks selected in the quasi-purchasing task that are alcoholic)*** This has already been computed by the research agency (as var Primaryoutcomeproportionofalcoholicdrinks) but always good to check** COMPUTE Primary_outcome_proportion=Totalnumberofalcoholicdrinksselected / Totalnumberofdrinksselected. EXECUTE. *to code 3 IDs as missing for the primary outcome (as per the research agency instructions)*** DO IF (ParticipantID = 1001) or (ParticipantID = 1002) or (ParticipantID = 1003). RECODE Primary_outcome_proportion (SYSMIS=-999). END IF. EXECUTE. *4 participants will be 0 / 0 and so remained as empty in the new variable* MISSING VALUES Primary_outcome_proportion (-999). ***************************************SECONDARY outcomes************************************** ***to compute the secondary outcome (Mean alcohol units from all drinks selected during the quasi-purchasing task)*** COMPUTE Mean_alcohol_units_1a = SecondaryoutcomeNumberofalcoholunitsselected / Totalnumberofdrinksselected. ***recode the secondary outcome (Selectedalcohol) into a dummy variable** RECODE Selectedalcohol (1=0) (2=1) (-999=-999). EXECUTE. VALUE LABELS Selectedalcohol 0 "No" 1 "Yes". EXECUTE. *4 participants will be 0 / 0 and so remained as empty in the new variable* ***to rename all the other secondary outcomes to match the SAP*** RENAME VARIABLES SecondaryoutcomeNumberofalcoholunitsselected = Numberofalcoholunitsselected_1b. RENAME VARIABLES Purchasingindice1secondaryoutcometotalspendonalcoholicdrinks = Totalspendonalcoholicdrinks_2a. RENAME VARIABLES Purchasingindice2secondaryoutcometotalspendonalcoholicdrinksasap = Totalspendonalcoholicdrink_proportion_2b. RENAME VARIABLES Selectedalcohol = Selectedalcohol_3. RENAME VARIABLES NEAMEANAVERAGE_TEXTONLY = NEAMEANAVERAGE_TEXTONLY_4a. RENAME VARIABLES NEAMEANAVERAGE_IMAGEandTEXT = NEAMEANAVERAGE_IMAGEandTEXT_4a. RENAME VARIABLES Acceptability_TEXTONLY = Acceptability_TEXTONLY_4b. RENAME VARIABLES Acceptability_IMAGEandTEXT = Acceptability_IMAGEandTEXT_4b. *to code 3 IDs as missing for the secondary outcome (as per the research agency instructions)*** DO IF (ParticipantID = 1001) or (ParticipantID = 1002) or (ParticipantID = 1003). RECODE Mean_alcohol_units_1a Totalspendonalcoholicdrink_proportion_2b (SYSMIS=-999). END IF. EXECUTE. DO IF (ParticipantID = 1001) or (ParticipantID = 1002) or (ParticipantID = 1003). RECODE Numberofalcoholunitsselected_1b Totalspendonalcoholicdrinks_2a (0=-999). END IF. EXECUTE. DO IF (ParticipantID = 1001) or (ParticipantID = 1002) or (ParticipantID = 1003). RECODE Selectedalcohol_3 (2=-999). END IF. EXECUTE. DO IF (ParticipantID = 1001) or (ParticipantID = 1002) or (ParticipantID = 1003). RECODE Totalnumberofalcoholicdrinksselected Unitsinalcoholfreedrinks Totalnumberofsoftdrinksselected Totalnumberofdrinksselected Totalnumberofalcoholfreedrinksselected (0=-999). END IF. EXECUTE. Missing values Mean_alcohol_units_1a Totalspendonalcoholicdrink_proportion_2b Numberofalcoholunitsselected_1b Totalspendonalcoholicdrinks_2a Totalnumberofdrinksselected Unitsinalcoholfreedrinks Totalnumberofalcoholicdrinksselected Totalnumberofsoftdrinksselected Totalnumberofalcoholfreedrinksselected Selectedalcohol_3 (-999). ***to calculate difference between within subject factors*** For secondary outcome 4a and 4b. Compute Difference_NEA_4a = NEAMEANAVERAGE_IMAGEandTEXT_4a - NEAMEANAVERAGE_TEXTONLY_4a. EXECUTE. COMPUTE Difference_Acceptability_4b=Acceptability_IMAGEandTEXT_4b - Acceptability_TEXTONLY_4b. EXECUTE. COMPUTE Difference_Acceptability_4bTWO=Acceptability_TEXTONLY_4b - Acceptability_IMAGEandTEXT_4b. EXECUTE. ***to code the order in which participants saw the within subjects image and image+text*** COMPUTE Order_within_subjects = MOD(ParticipantID, 2). EXECUTE. VALUE LABELS Order_within_subjects 0 "order 1" 1 "order 2". EXECUTE. ***set to scale remaining variables*** VARIABLE level Acceptability_IMAGEandTEXT_4b (SCALE). VARIABLE level Acceptability_TEXTONLY_4b (SCALE). ***to code the 18 different cluster sessions*** IF Date = date.dmy (01, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 1 Cluster=1. EXECUTE. IF Date = date.dmy (01, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 2 Cluster=2. EXECUTE. IF Date = date.dmy (01, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 3 Cluster=3. EXECUTE. IF Date = date.dmy (03, 02, 2020) AND Day1 = 2 AND Condition_1_3 = 1 Cluster=4. EXECUTE. IF Date = date.dmy (03, 02, 2020) AND Day1 = 2 AND Condition_1_3 = 3 Cluster=5. EXECUTE. IF Date = date.dmy (04, 02, 2020) AND Day1 = 5 AND Condition_1_3 = 2 Cluster=6. EXECUTE. IF Date = date.dmy (04, 02, 2020) AND Day1 = 5 AND Condition_1_3 = 1 Cluster=7. EXECUTE. IF Date = date.dmy (05, 02, 2020) AND Day1 = 6 AND Condition_1_3 = 1 Cluster=8. EXECUTE. IF Date = date.dmy (05, 02, 2020) AND Day1 = 6 AND Condition_1_3 = 2 Cluster=9. EXECUTE. IF Date = date.dmy (06, 02, 2020) AND Day1 = 4 AND Condition_1_3 = 3 Cluster=10. EXECUTE. IF Date = date.dmy (06, 02, 2020) AND Day1 = 4 AND Condition_1_3 = 2 Cluster=11. EXECUTE. IF Date = date.dmy (07, 02, 2020) AND Day1 = 1 AND Condition_1_3 = 2 Cluster=12. EXECUTE. IF Date = date.dmy (07, 02, 2020) AND Day1 = 1 AND Condition_1_3 = 3 Cluster=13. EXECUTE. IF Date = date.dmy (08, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 3 Cluster=14. EXECUTE. IF Date = date.dmy (08, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 1 Cluster=15. EXECUTE. IF Date = date.dmy (08, 02, 2020) AND Day1 = 3 AND Condition_1_3 = 2 Cluster=16. EXECUTE. IF Date = date.dmy (10, 02, 2020) AND Day1 = 2 AND Condition_1_3 = 3 Cluster=17. EXECUTE. IF Date = date.dmy (10, 02, 2020) AND Day1 = 2 AND Condition_1_3 = 1 Cluster=18. EXECUTE.