* Encoding: UTF-8.

*********************************The Impact of Health Warning Labels on Snack Selection: Study Two******************************************

***This syntax will produce all analysis (and more) for the manuscript 'Impact of health warning labels on snack selection: an online experimental study' Clarke et al.. 
***You MUST run 'FoodLabellingStudy_CodeForCodingData _v1.0_20190602' FIRST
***The syntax was created by Katie De-loyde (Bristol University) on 12/06/2019
***The syntax was checked and edited by HS on 18/06/2020.

**There are 4134 participants for analysis. NO EXCLUSIONS***

**HWL (Health warning label).
*Condition refers to the original 6 level study group variable (Group 1: pictorial HWL with calories; Group 2: text-only HWL with calories; Group 3: calories only; Group 4: Pictorial HWL; Group 5: Text-only HWL; Group 6: Control [no label])*
*HWL refers to the 3 level recoded variable created in FoodLabellingStudy_CodeForCodingData _v1.0_20190602 (Group 2: no HWL label; group 1: Pictorial present; group 0: Text [no pictorial] present)
*Calories refers to the 2 level variable created in FoodLabellingStudy_CodeForCodingData _v1.0_20190602 (group 0: calorie information; group 1: no calorie information). 

*As per the SAP, a 2 x 3 model (or a 2 x 2 x 3) was used for each secondary outcome. This is model 1.
*Additionally, for clarity, a simpler model 2 was produced for all outcomes which just included the 6 level 'Condition' variable.

************************************************************************************************************Demographic tables ******************************************************

*** Table - Participant demographics by condition (n=4134)***

CTABLES
  /VLABELS VARIABLES=Gender BMIcategory Ethnicitydichotomised Income_split 
    Highestqualificationsplit01 Condition DISPLAY=LABEL
  /TABLE Gender [C] + BMIcategory [C] + Ethnicitydichotomised [C] + Income_split > 
    Highestqualificationsplit01 [C] BY Condition [C][COUNT F40.0, COLPCT.COUNT PCT40.1]
  /CATEGORIES VARIABLES=Gender BMIcategory Ethnicitydichotomised Income_split 
    Highestqualificationsplit01 Condition ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

***Table - Participant pre-intervention snack preferences by condition (n=4134)***

CTABLES
  /VLABELS VARIABLES=Snackconsumptionfrequency Biscuitsandcookies Cakesmuffinsandpastries 
    Chocolatebarsorotherchocolatebasedsnackse.g.packofmampms 
    Sweetse.g.bagofskittlespacketoffruitpastilles Packetsofcrisps Condition 
    DISPLAY=LABEL
  /TABLE Snackconsumptionfrequency [C] + Biscuitsandcookies [C] + Cakesmuffinsandpastries [C] + 
    Chocolatebarsorotherchocolatebasedsnackse.g.packofmampms [C] + 
    Sweetse.g.bagofskittlespacketoffruitpastilles [C] + Packetsofcrisps [C] BY Condition [C][COUNT 
    F40.0, COLPCT.COUNT PCT40.1]
  /CATEGORIES VARIABLES=Snackconsumptionfrequency Biscuitsandcookies Cakesmuffinsandpastries 
    Chocolatebarsorotherchocolatebasedsnackse.g.packofmampms 
    Sweetse.g.bagofskittlespacketoffruitpastilles Packetsofcrisps Condition ORDER=A KEY=VALUE 
    EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

*** Table - Calories in the snack chosen from task between condition***

CTABLES
  /VLABELS VARIABLES=Condition Caloriesinsnack DISPLAY=NAME
  /TABLE Condition [C] BY Caloriesinsnack [S][MEAN, STDDEV]
  /CATEGORIES VARIABLES=Condition ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

*************************************************************************************************************Primary outcome analysis************************************************

***(raw) Descriptives for primary outcome***

*Descriptives for model 1 (3 x 2 design) (HWL [3 groups] by whether calorie information is present)

CTABLES
  /VLABELS VARIABLES=HWL Calories Primaryoutcome DISPLAY=LABEL
  /TABLE HWL [C] + Calories [C] BY Primaryoutcome [C][COUNT F40.0, ROWPCT.COUNT PCT40.1]
  /CATEGORIES VARIABLES=HWL Calories Primaryoutcome ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

*Descriptives for model 2 (condition - 6 groups)

CTABLES
  /VLABELS VARIABLES=Condition Primaryoutcome DISPLAY=LABEL
  /TABLE Condition [C][COUNT F40.0, ROWPCT.COUNT PCT40.1] BY Primaryoutcome [C]
  /CATEGORIES VARIABLES=Condition Primaryoutcome ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

***Models for primary outcome***

*Logistic regression model 1 (3 x 2 design) - including the two variables of HWL group (3 levels) and calorie information (2 levels).
*the interaction between HWL*Calorie is included in the model

NOMREG Primaryoutcome (BASE=FIRST ORDER=ASCENDING) BY HWL Calories
  /CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0) PCONVERGE(0.000001) 
    SINGULAR(0.00000001)
  /FULLFACTORIAL
  /STEPWISE=PIN(.05) POUT(0.1) MINEFFECT(0) RULE(SINGLE) ENTRYMETHOD(LR) REMOVALMETHOD(LR)
  /INTERCEPT=INCLUDE
  /PRINT=PARAMETER SUMMARY LRT CPS STEP MFI.

*Logistic regression model 1 (3 x 2 design)- including the two variables of HWL group (3 levels) and calorie information (2 levels). 
*There was no evidence of a significant interaction between HWL*calorie information from the above model (p = 0.282). Therefore, the interaction was removed, and model 1 below includes the main effects only (this is the reported model)*

LOGISTIC REGRESSION VARIABLES Primaryoutcome
  /METHOD=ENTER HWL Calories 
  /CONTRAST (HWL)=Indicator(1)
  /PRINT=CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

*Logistic regression model 2 (condition - 6 groups) - no interaction needed as only one variable 

LOGISTIC REGRESSION VARIABLES Primaryoutcome
  /METHOD=ENTER Condition 
  /CONTRAST (Condition)=Indicator
  /PRINT=CI(95)
  /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

****************************************************************************************************************Secondary A outcomes ************************************************

***Normality for all secondary outcomes is assessed below using normality plots and statistical tests (Kolmogorov-Smirnov and Shapiro-Wilk)***
*regardless of result, SAP does not change*

EXAMINE VARIABLES=NEAmeanaverage
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

EXAMINE VARIABLES=Reactance
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

EXAMINE VARIABLES=Avoidance
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

EXAMINE VARIABLES=Diseaserisktotal
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

EXAMINE VARIABLES=Acceptability
  /PLOT BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /COMPARE GROUPS
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

***Table - Descriptive raw secondary A outcome(s) data by condition***

CTABLES
  /VLABELS VARIABLES=NEAmeanaverage Reactance Avoidance Diseaserisktotal Acceptability Condition 
    DISPLAY=LABEL
  /TABLE NEAmeanaverage [S][MEAN, STDDEV, MINIMUM, MAXIMUM] + Reactance [S][MEAN, STDDEV, MINIMUM, 
    MAXIMUM] + Avoidance [S][MEAN, STDDEV, MINIMUM, MAXIMUM] + Diseaserisktotal [S][MEAN, STDDEV, 
    MINIMUM, MAXIMUM] + Acceptability [S][MEAN, STDDEV, MINIMUM, MAXIMUM] BY Condition [C]
  /CATEGORIES VARIABLES=Condition ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

CTABLES
  /VLABELS VARIABLES=Acceptability Acceptabilitycondition DISPLAY=LABEL
  /TABLE Acceptability [S][MEAN, STDDEV, MINIMUM, MAXIMUM] BY Acceptabilitycondition [C]
  /CATEGORIES VARIABLES=Acceptabilitycondition ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

*************************************************Secondary outcomes A analysis******************

****************Secondary A outcome - Negative Emotional Arousal***

***GLM Model 1 (3 x 2 design)- including the two variables of HWL group (3 levels) and calorie information (2 levels).
*the interaction between HWL*Calorie is included in the model

UNIANOVA NEAmeanaverage BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

*the interaction showed strong evidence of significance (p < 0.001) and so remains in the above model 1 (the above model is the reported model)**

*GLM model 2 (condition - 6 groups) - no interaction needed as only one variable 

UNIANOVA NEAmeanaverage BY Condition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Condition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Condition.

*****************************Secondary A outcome - Reactance***

***GLM Model 1 (3 x 2 design)- including the two variables of HWL group (3 levels) and calorie information (2 levels).
*the interaction between HWL*Calorie is included in the model

UNIANOVA Reactance BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

*the interaction showed strong evidence of significance  (p < 0.001) and so remains in the above model 1 (the above model is the reported model)**

*GLM model 2 (condition - 6 groups) - no interaction needed as only one variable 

UNIANOVA Reactance BY Condition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Condition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Condition.

*********************************** Secondary A outcome - Avoidance***

***GLM model 1 (3 x 2 design)- including the two variables of HWL group (3 levels) and calorie information (2 levels).
*the interaction between HWL*Calorie is included in the model

UNIANOVA Avoidance BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

*the interaction  showed strong evidence of significance  (p < 0.001) and so remains in the above model 1  (the above model is the reported model)**

*GLM model 2 (condition - 6 groups) - no interaction needed as only one variable

UNIANOVA  Avoidance BY Condition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Condition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Condition.

************************Secondary A outcome - Disease risk total***

***GLM model 1 (3 x 2 design) - including the two variables of HWL group (3 levels) and calorie information (2 levels).
*the interaction between HWL*Calorie is included in the model

UNIANOVA Diseaserisktotal BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

*the HWL*Calorie interaction showed no evidence of significance (p = 0.464) and so was removed from the above model 1. The model below includes the main effects only (this is the reported model)*
*new model, no interaction. 

UNIANOVA Diseaserisktotal BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories.

*GLM model 2 (condition - 6 groups) - no interaction needed as only one variable

UNIANOVA  Diseaserisktotal BY Condition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Condition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Condition.

******************************************Secondary A outcome - Acceptability***

*GLM model 2 (condition - 5 groups [5 groups only as the control group were re randomized for this part of the analysis) - no interaction needed as only one variable

UNIANOVA Acceptability BY Acceptabilitycondition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Acceptabilitycondition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Acceptabilitycondition.

***********************************************************************************************************************Secondary B outcome**************************************

***Descriptive raw secondary B outcome data by condition ***

CTABLES
  /VLABELS VARIABLES=Timemanipulationselectiontask Condition Timemanipulationcondition DISPLAY=LABEL    
  /TABLE Timemanipulationselectiontask [S][MEAN, STDDEV, MEDIAN] BY Condition [C] > 
    Timemanipulationcondition [C]
  /CATEGORIES VARIABLES=Condition Timemanipulationcondition ORDER=A KEY=VALUE EMPTY=INCLUDE
  /CRITERIA CILEVEL=95.

***********************Time pressure task outcome (how many energy-dense snacks selected 0-6).

***GLM model 1 (3 x 2 x 2 design) - including the three variables of HWL group (3 levels), calorie information  (2 levels) and time pressure (2 levels). 
*Since the focus of this secondary analysis is on time pressure, as per the SAP we only investigated two 2-way interactions: (i) time pressure vs. presence of HWL (ii) time pressure vs. presence of calorie information. 

UNIANOVA Timemanipulationselectiontask BY Timemanipulationcondition HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories Timemanipulationcondition*HWL Timemanipulationcondition*Calories.

*The interaction terms for interactions between time pressure and HWL (p = 0.467) and between time pressure and calorie information (p = 0.798) were both deemed to show no evidence of a significant interaction and so were removed from model 1
*new model with main effects only below (this is the reported model)*

UNIANOVA Timemanipulationselectiontask BY Timemanipulationcondition HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Timemanipulationcondition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Timemanipulationcondition HWL Calories.

*GLM model 2 (condition - 6 groups) - no interaction needed as only one variable

UNIANOVA Timemanipulationselectiontask BY Timemanipulationcondition Condition
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(Timemanipulationcondition) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Condition) COMPARE ADJ(LSD)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=Timemanipulationcondition Condition.

***Additional information for reporting reaction terms***
***interactions for secondary outcomes (where the interaction showed evidence of significance)*** (add 'COMPARE (Calories)' to the code to give you the interaction MD [mean difference] and CI [confidence interval])

UNIANOVA NEAmeanaverage BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) COMPARE (Calories) 
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

UNIANOVA Reactance BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) COMPARE (Calories)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

UNIANOVA Avoidance BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) COMPARE (Calories)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.

UNIANOVA Diseaserisktotal BY HWL Calories
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /EMMEANS=TABLES(HWL) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(Calories) COMPARE ADJ(LSD)
  /EMMEANS=TABLES(HWL*Calories) COMPARE (Calories)
  /PRINT=DESCRIPTIVE
  /CRITERIA=ALPHA(.05)
  /DESIGN=HWL Calories HWL*Calories.









