setwd(“/Users/maycheung/Documents/Research/After BC/Social Media/Results”)

Load packages and data set

Cronbach’s alpha for food groups

## Vegetable 
full.df %>% 
  select(starts_with("veg"))%>%
  select(!"vegetable.day") %>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 6
## Sample units: 97
## alpha: 0.773
## Fruit 
full.df %>% 
  select(starts_with("fruit"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 6
## Sample units: 99
## alpha: 0.638
## Salty/fat 
full.df %>% 
  select(starts_with("saltyfat"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 8
## Sample units: 85
## alpha: 0.683
## Alcohol 
full.df %>% 
  select(starts_with("alcohol"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 5
## Sample units: 79
## alpha: 0.766
## Whole grain 
full.df %>% 
  select(starts_with("wg"))%>%
  select(!c("wg.day", "wg.freq"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 4
## Sample units: 98
## alpha: 0.733
## Carbs
full.df %>% 
  select(starts_with("carbs"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 5
## Sample units: 99
## alpha: 0.452
## Healthy fats
full.df %>% 
  select(starts_with("healthyfat"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 4
## Sample units: 98
## alpha: 0.628
## Sweets
full.df %>% 
  select(starts_with("sweets"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 5
## Sample units: 100
## alpha: 0.76
## Sugar-sweetened beverages and sweets
full.df %>% 
  select(starts_with(c("ssb", "sweets")))%>%
  select(!c("ssb.day", "ssb.freq")) %>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 9
## Sample units: 87
## alpha: 0.712
## Unhealthy fat
full.df %>% 
  select(starts_with("unhealthyfat"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 5
## Sample units: 99
## alpha: 0.506
## Protein
full.df %>% 
  select(starts_with("protein"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 5
## Sample units: 76
## alpha: 0.581
## Spicy foods
full.df %>% 
  select(starts_with("spicy"))%>%
  na.omit() %>%
  cronbach.alpha(.)
## 
## Cronbach's alpha for the '.' data-set
## 
## Items: 3
## Sample units: 93
## alpha: 0.713

Scores decoding

## Sweet liking score
liking.df <- full.df %>% 
  select(starts_with(c("ID", "ssb", "sweets", "veg", "fruit", "saltyfat", "fatprotein", "alcohol", "wg", "carbs", "healthyfat", "unhealthyfat", "protein", "spicy")))%>%
  select(!c("ssb.day", "ssb.freq", "vegetable.day", "fruit.day", "wg.day", "wg.freq")) %>%
  mutate(sweet.liking = rowMeans(select(., "ssb.soda":"sweets.chocolate"), na.rm = TRUE), 
         veg.liking = rowMeans(select(., "veg.greens":"veg.carrots"), na.rm = TRUE), 
         fruit.liking = rowMeans(select(., "fruit.citrus":"fruit.melon"), na.rm = TRUE), 
         saltyfat.liking = rowMeans(select(., "saltyfat.snacks":"saltyfat.delimeats"), na.rm = TRUE), 
         fatprotein.liking = fatprotein.friedmeats, 
         alcohol.liking = rowMeans(select(., "alcohol.beer":"alcohol.cocktails"), na.rm = TRUE), 
         wg.liking = rowMeans(select(., "wg.bread":"wg.brownrice"), na.rm = TRUE), 
         carbs.liking = rowMeans(select(., "carbs.rice":"carbs.cereal"), na.rm = TRUE), 
         healthyfat.liking = rowMeans(select(., "healthyfat.nuts":"healthyfat.avocado"), na.rm = TRUE), 
         unhealthyfat.liking = rowMeans(select(., "unhealthyfat.cheese":"unhealthyfat.oil"), na.rm = TRUE),
         protein.liking = rowMeans(select(., "protein.chicken":"protein.fish"), na.rm = TRUE), 
         spicy.liking = rowMeans(select(., "spicy.hotsauce":"spicy.mustard"), na.rm = TRUE)) %>%
  select(ends_with(".liking")) 

## Body appreciation scale 
BAS.df <- full.df %>% 
  select("ID", starts_with("BAS")) %>%
  mutate(BAS = rowSums(select(., 2:11), na.rm = TRUE)) 

## Three factor questionnaire
TFQ.df <- full.df %>% 
  select("ID", starts_with("TFQ")) %>%
  mutate(uncontrolled = rowSums(select(., "TFQ.03", "TFQ.06", "TFQ.08", "TFQ.09", "TFQ.12", "TFQ.13", "TFQ.15", "TFQ.19", "TFQ.20"), na.rm = TRUE)) %>%
  mutate(restraint = rowSums(select(., "TFQ.01", "TFQ.05", "TFQ.11", "TFQ.17", "TFQ.18", "TFQ.21"), na.rm = TRUE)) %>%
  mutate(emotional = rowSums(select(., "TFQ.02", "TFQ.04", "TFQ.07", "TFQ.10", "TFQ.14", "TFQ.16"), na.rm = TRUE))

## Adult eating behavior questionnaire
AEBQ.df <- full.df %>% 
  select("ID", starts_with("AEBQ")) %>%
  mutate(EF = rowSums(select(., "AEBQ.01", "AEBQ.03", "AEBQ.04"), na.rm = TRUE)) %>%
  mutate(EOE = rowSums(select(., "AEBQ.05", "AEBQ.08", "AEBQ.10", "AEBQ.16"), na.rm = TRUE)) %>%
  mutate(EUE = rowSums(select(., "AEBQ.15", "AEBQ.20", "AEBQ.27", "AEBQ.35"), na.rm = TRUE)) %>%
  mutate(FF = rowSums(select(., "AEBQ.02", "AEBQ.07", "AEBQ.12", "AEBQ.19", "AEBQ.24"), na.rm = TRUE)) %>%
  mutate(FR = rowSums(select(., "AEBQ.13", "AEBQ.22", "AEBQ.33"), na.rm = TRUE)) %>%
  mutate(SE = rowSums(select(., "AEBQ.14", "AEBQ.25", "AEBQ.26", "AEBQ.29"), na.rm = TRUE)) %>%
  mutate(H = rowSums(select(., "AEBQ.06", "AEBQ.09", "AEBQ.28", "AEBQ.32", "AEBQ.34"), na.rm = TRUE)) %>%
  mutate(SR = rowSums(select(., "AEBQ.11", "AEBQ.23", "AEBQ.30", "AEBQ.31"), na.rm = TRUE)) 

## BMI
BMI.df <- full.df %>%
  select("ID", "weight", "height") %>%
  mutate(BMI = weight/(height^2)*703)

## sHEI score
HEI.df <- full.df %>%
  select("ID", "sex", ends_with(c(".day", ".freq", ".amount"))) %>%
  mutate(fruit.1 = case_when(
    fruit.day == 1 ~ 0,
    fruit.day == 2 ~ 2, 
    fruit.day == 3 ~ 3.5,
    fruit.day >= 4 ~ 5)) %>%
  mutate(fruit.2 = case_when (
    juice.day == 1 ~ 0,
    juice.day == 2 ~ 2,
    juice.day == 3 ~ 3.5,
    juice.day >= 4 ~ 5)) %>% 
  mutate(tfruitHEI = case_when(
    fruit.1 + fruit.2 <5 ~ 0,
    fruit.1 + fruit.2 >= 5 ~ 5)) %>%
  mutate(wfruitHEI = case_when(
    fruit.day == 1 ~ 0,
    fruit.day == 2 ~ 2.5, 
    fruit.day >= 3 ~ 5)) %>%
  mutate(vegHEI = case_when(
    greens.day == 1 ~ 1.6,
    greens.day == 2 & starchy.day >= 2 ~ 2.46,
    greens.day >= 2 & starchy.day >= 2 ~ 3.24,
    greens.day >= 2 & starchy.day == 1 ~ 3.56)) %>%
  mutate(bean.1 = case_when(
    greens.day == 1 ~ 0,
    greens.day >= 2 ~5)) %>%
  mutate(bean.2 = case_when(
    beans.day == 1 ~ 0,
    beans.day >= 2 ~ 5)) %>%
  mutate(beanHEI = case_when(
    bean.1 + bean.2 < 5 ~ 0,
    bean.1 + bean.2 >= 5 ~ 5)) %>%
  mutate(wgHEI = case_when(
    wg.day == 1 ~ 0.51,
    sex == 1 & wg.day >= 2 ~ 2.97,
    sex == 2 & wg.day >= 2 & wg.day <= 3 ~ 5.20,
    sex == 2 & wg.day >= 4 ~ 6.94)) %>%
  mutate(dairyHEI = case_when(
    sex == 1 & milk.day <= 3 ~ 3.22,
    sex == 2 & milk.day <= 3 & lfmilk.day == 1 ~ 3.32,
    sex == 2 & milk.day <= 3 & lfmilk.day >= 2 ~ 4.81,
    milk.day >= 4 ~ 6.51)) %>%
  mutate(tproteinHEI = case_when(
    sex == 1 & seafood.freq <= 4 ~ 4.11,
    sex == 1 & seafood.freq >= 5 ~ 4.98,
    sex == 1 & is.na(seafood.freq) ~ 4.11,
    sex == 2 ~ 4.97)) %>%
  mutate(sfpproteinHEI = case_when(
    sex == 1 & nuts.day <= 2 ~ 0.49,
    sex == 2 & nuts.day <= 2 ~ 1.50,
    nuts.day >= 3 ~ 4.20)) %>%
  mutate(farHEI = case_when(
    milk.day >= 4 ~ 2.56,
    fat.amount >= 2 & fat.amount <= 3 & milk.freq >= 1 & lfmilk.freq <= 2 ~ 2.63,
    fat.amount >= 2 & fat.amount <= 3 & is.na(milk.freq) | is.na(lfmilk.freq) ~ 2.63,
    fat.amount >= 2 & fat.amount <= 3 & milk.freq >= 1 & lfmilk.freq >= 3 ~ 4.54,
    fat.amount == 1 & milk.freq >= 1 ~ 5.93,
    fat.amount == 1 & is.na(milk.freq) ~ 5.93)) %>%
  mutate(grainHEI = case_when(
    greens.day == 1 ~ 2.13,
    grains.day >= 3 & seafood.day >= 2 & greens.day >= 2 ~ 2.27,
    grains.day >= 3 & nuts.day >= 1 & nuts.day <= 2 & seafood.day == 1 & greens.day >= 2 ~ 4.73,
    grains.day >= 3 & nuts.day >= 3 & seafood.day == 1 & greens.day >= 2 ~ 8.45,
    grains.day >= 1 & grains.day <= 2 & greens.day >= 2 ~ 9.25)) %>%
  mutate(sodiumHEI = case_when(
    fruit.day >= 1 & fruit.day <= 2 & grains.day >= 3 & water.amount == 3 ~ 0.70,
    fruit.day >= 3 & grains.day >= 3 & water.amount == 3 ~ 2.30,
    grains.day >= 3 & water.amount >= 1 & water.amount <= 2 ~ 4.94,
    grains.day >= 1 & grains.day <= 2 ~ 6.07)) %>%
  mutate(ssb.day.cal = case_when(
    ssb.day == 1  ~ 0,
    ssb.day == 2 ~ 156,
    ssb.day == 3 ~ 312,
    ssb.day == 4 ~ 468,
    ssb.day == 5 ~ 624,
    ssb.day == 6 ~ 780,
    ssb.day == 7 ~ 936),
    sugar.cal = case_when(
    sugars.amount == 1 ~ 130,
    sugars.amount == 2 ~ 260,
    sugars.amount == 3 ~ 520)) %>%
  mutate(sugar.intake = (ssb.day.cal + sugar.cal)) %>%
  mutate(sugarHEI = case_when(
    sugar.intake <= 130 ~ 0,
    sugar.intake > 130 & sugar.intake < 520 ~ 5,
    sugar.intake >= 520 ~ 0)) %>%
  mutate(fatHEI = case_when(
    ssb.day >= 3 ~ 1.82,
    ssb.day <= 2 & grains.day <= 2 ~ 3.20,
    ssb.day <= 2 & grains.day >= 3 & nuts.day <= 2 ~ 4.64,
    ssb.day <= 2 & grains.day >= 3 & nuts.day >= 3 ~ 6.56)) %>%
  select("ID", "sugar.intake", "sugars.amount",ends_with("HEI")) %>%
  mutate(sHEI = rowSums(select(., "tfruitHEI":"fatHEI"), na.rm = TRUE)) %>%
  mutate(SuFatHEI = rowSums(select(., c("sugarHEI", "fatHEI")))) 
  
## Putting scores together
EB.df <- bind_cols(select(full.df, 1:17, "ssb.day", "sugars.amount"), select(BMI.df, "BMI"), select(liking.df, "sweet.liking"), select(HEI.df, c("sugar.intake", "sugarHEI", "fatHEI", "SuFatHEI", "sHEI")), select(BAS.df, "BAS"), select(TFQ.df, c("uncontrolled", "restraint", "emotional")), select(AEBQ.df, c("EF", "EOE", "EUE", "FF", "FR", "SE", "H", "SR"))) %>%
  mutate(emo = rowSums(select(., c("emotional", "EOE")))) 

## EB: females only
EB.fem.df <- EB.df %>% filter(sex == "2")

## EB: males only
EB.mal.df <- EB.df %>% filter(sex == "1")

Correlations - sweet liking

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugar intake and traits
    ## Age X BMI
    corrfunc(EB.df, age, BMI, "Correlation - Age X BMI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X sweet liking
    corrfunc(EB.df, sex, sweet.liking, "Correlation - Sex X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Age X sweet liking
    corrfunc(EB.df, age, sweet.liking, "Correlation - Age X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sweet liking
    corrfunc(EB.df, BMI, sweet.liking, "Correlation - BMI X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sugar intake X sweet liking
    corrfunc(EB.df, sugar.intake, sweet.liking, "Correlation - Sugar Intake X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X sweet liking
    corrfunc(EB.df, ssb.day, sweet.liking, "Correlation - SSB X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sweet liking
    corrfunc(EB.df, emotional, sweet.liking, "Correlation - Emotional Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sweet liking
    corrfunc(EB.df, uncontrolled, sweet.liking, "Correlation - Uncontrolled Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sweet liking
    corrfunc(EB.df, restraint, sweet.liking, "Correlation - Dietary Restraint X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sweet liking
    corrfunc(EB.df, EF, sweet.liking, "Correlation - Enjoyment of Food X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sweet liking
    corrfunc(EB.df, EOE, sweet.liking, "Correlation - Emotional Over-Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sweet liking
    corrfunc(EB.df, EUE, sweet.liking, "Correlation - Emotional Under-Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sweet liking
    corrfunc(EB.df, FF, sweet.liking, "Correlation - Food fussiness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sweet liking
    corrfunc(EB.df, FR, sweet.liking, "Correlation - Food Responsiveness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X sweet liking
    corrfunc(EB.df, SE, sweet.liking, "Correlation - Slowness in Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X sweet liking
    corrfunc(EB.df, H, sweet.liking, "Correlation - Hunger X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X sweet liking
    corrfunc(EB.df, SR, sweet.liking, "Correlation - Satiety Responsiveness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sweet liking
    corrfunc(EB.df, emo, sweet.liking, "Correlation - Emo X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sweet liking: females only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugar intake and traits
    ## Age X sweet liking
    corrfunc(EB.fem.df, age, sweet.liking, "Correlation - Age X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sweet liking
    corrfunc(EB.fem.df, BMI, sweet.liking, "Correlation - BMI X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sugar intake X sweet liking
    corrfunc(EB.fem.df, sugar.intake, sweet.liking, "Correlation - Sugar Intake X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X sweet liking
    corrfunc(EB.fem.df, ssb.day, sweet.liking, "Correlation - SSB X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sweet liking
    corrfunc(EB.fem.df, emotional, sweet.liking, "Correlation - Emotional Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sweet liking
    corrfunc(EB.fem.df, uncontrolled, sweet.liking, "Correlation - Uncontrolled Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sweet liking
    corrfunc(EB.fem.df, restraint, sweet.liking, "Correlation - Dietary Restraint X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sweet liking
    corrfunc(EB.fem.df, EF, sweet.liking, "Correlation - Enjoyment of Food X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sweet liking
    corrfunc(EB.fem.df, EOE, sweet.liking, "Correlation - Emotional Over-Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sweet liking
    corrfunc(EB.fem.df, EUE, sweet.liking, "Correlation - Emotional Under-Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sweet liking
    corrfunc(EB.fem.df, FF, sweet.liking, "Correlation - Food fussiness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sweet liking
    corrfunc(EB.fem.df, FR, sweet.liking, "Correlation - Food Responsiveness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X sweet liking
    corrfunc(EB.fem.df, SE, sweet.liking, "Correlation - Slowness in Eating X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X sweet liking
    corrfunc(EB.fem.df, H, sweet.liking, "Correlation - Hunger X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X sweet liking
    corrfunc(EB.fem.df, SR, sweet.liking, "Correlation - Satiety Responsiveness X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sweet liking
    corrfunc(EB.fem.df, emo, sweet.liking, "Correlation - Emo X Sweet Liking")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sugar intake

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugar intake and traits
    ## Age X sugar intake
    corrfunc(EB.df, age, sugar.intake, "Correlation - Age X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sugar intake
    corrfunc(EB.df, BMI, sugar.intake, "Correlation - BMI X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X sugar intake
    corrfunc(EB.df, sex, sugar.intake, "Correlation - Sex X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X sugar intake
    corrfunc(EB.df, sweet.liking, sugar.intake, "Correlation - Sweet Liking X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X sugar intake
    corrfunc(EB.df, ssb.day, sugar.intake, "Correlation - SSB X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sugar intake
    corrfunc(EB.df, emotional, sugar.intake, "Correlation - Emotional Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sugar intake
    corrfunc(EB.df, uncontrolled, sugar.intake, "Correlation - Uncontrolled Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sugar intake
    corrfunc(EB.df, restraint, sugar.intake, "Correlation - Dietary Restraint X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sugar intake
    corrfunc(EB.df, EF, sugar.intake, "Correlation - Enjoyment of Food X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sugar intake
    corrfunc(EB.df, EOE, sugar.intake, "Correlation - Emotional Over-Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sugar intake
    corrfunc(EB.df, EUE, sugar.intake, "Correlation - Emotional Under-Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sugar intake
    corrfunc(EB.df, FF, sugar.intake, "Correlation - Food fussiness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sugar intake
    corrfunc(EB.df, FR, sugar.intake, "Correlation - Food Responsiveness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X sugar intake
    corrfunc(EB.df, SE, sugar.intake, "Correlation - Slowness in Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X sugar intake
    corrfunc(EB.df, H, sugar.intake, "Correlation - Hunger X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X sugar intake
    corrfunc(EB.df, SR, sugar.intake, "Correlation - Satiety Responsiveness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sweet liking
    corrfunc(EB.df, emo, sugar.intake, "Correlation - Emo X Sweet Intake")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sugar intake: females only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugar intake and traits
    ## Age X sugar intake
    corrfunc(EB.fem.df, age, sugar.intake, "Correlation - Age X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sugar intake
    corrfunc(EB.fem.df, BMI, sugar.intake, "Correlation - BMI X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X sugar intake
    corrfunc(EB.fem.df, sweet.liking, sugar.intake, "Correlation - Sweet Liking X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sugar intake
    corrfunc(EB.fem.df, emotional, sugar.intake, "Correlation - Emotional Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sugar intake
    corrfunc(EB.fem.df, uncontrolled, sugar.intake, "Correlation - Uncontrolled Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sugar intake
    corrfunc(EB.fem.df, restraint, sugar.intake, "Correlation - Dietary Restraint X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sugar intake
    corrfunc(EB.fem.df, EF, sugar.intake, "Correlation - Enjoyment of Food X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sugar intake
    corrfunc(EB.fem.df, EOE, sugar.intake, "Correlation - Emotional Over-Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sugar intake
    corrfunc(EB.fem.df, EUE, sugar.intake, "Correlation - Emotional Under-Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sugar intake
    corrfunc(EB.fem.df, FF, sugar.intake, "Correlation - Food fussiness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sugar intake
    corrfunc(EB.fem.df, FR, sugar.intake, "Correlation - Food Responsiveness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X sugar intake
    corrfunc(EB.fem.df, SE, sugar.intake, "Correlation - Slowness in Eating X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X sugar intake
    corrfunc(EB.fem.df, H, sugar.intake, "Correlation - Hunger X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X sugar intake
    corrfunc(EB.fem.df, SR, sugar.intake, "Correlation - Satiety Responsiveness X Sugar Intake")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sugar intake
    corrfunc(EB.fem.df, emo, sugar.intake, "Correlation - Emo X Sweet Intake")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - fat sHEI score

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - fatHEI and traits
    ## Age X fatHEI
    corrfunc(EB.df, age, fatHEI, "Correlation - Age X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X fatHEI
    corrfunc(EB.df, BMI, fatHEI, "Correlation - BMI X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X fatHEI
    corrfunc(EB.df, sex, fatHEI, "Correlation - Sex X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X fatHEI
    corrfunc(EB.df, sweet.liking, fatHEI, "Correlation - Sweet Liking X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X fatHEI
    corrfunc(EB.df, emotional, fatHEI, "Correlation - Emotional Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X fatHEI
    corrfunc(EB.df, uncontrolled, fatHEI, "Correlation - Uncontrolled Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X fatHEI
    corrfunc(EB.df, restraint, fatHEI, "Correlation - Dietary Restraint X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X fatHEI
    corrfunc(EB.df, EF, fatHEI, "Correlation - Enjoyment of Food X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X fatHEI
    corrfunc(EB.df, EOE, fatHEI, "Correlation - Emotional Over-Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X fatHEI
    corrfunc(EB.df, EUE, fatHEI, "Correlation - Emotional Under-Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X fatHEI
    corrfunc(EB.df, FF, fatHEI, "Correlation - Food fussiness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X fatHEI
    corrfunc(EB.df, FR, fatHEI, "Correlation - Food Responsiveness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X fatHEI
    corrfunc(EB.df, SE, fatHEI, "Correlation - Slowness in Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X fatHEI
    corrfunc(EB.df, H, fatHEI, "Correlation - Hunger X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X fatHEI
    corrfunc(EB.df, SR, fatHEI, "Correlation - Satiety Responsiveness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X fatHEI
    corrfunc(EB.df, emo, fatHEI, "Correlation - Emo X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - fat sHEI score: females only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - fatHEI and traits
    ## Age X fatHEI
    corrfunc(EB.fem.df, age, fatHEI, "Correlation - Age X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X fatHEI
    corrfunc(EB.fem.df, BMI, fatHEI, "Correlation - BMI X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X fatHEI
    corrfunc(EB.fem.df, sweet.liking, fatHEI, "Correlation - Sweet Liking X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X fatHEI
    corrfunc(EB.fem.df, emotional, fatHEI, "Correlation - Emotional Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X fatHEI
    corrfunc(EB.fem.df, uncontrolled, fatHEI, "Correlation - Uncontrolled Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X fatHEI
    corrfunc(EB.fem.df, restraint, fatHEI, "Correlation - Dietary Restraint X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X fatHEI
    corrfunc(EB.fem.df, EF, fatHEI, "Correlation - Enjoyment of Food X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X fatHEI
    corrfunc(EB.fem.df, EOE, fatHEI, "Correlation - Emotional Over-Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X fatHEI
    corrfunc(EB.fem.df, EUE, fatHEI, "Correlation - Emotional Under-Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X fatHEI
    corrfunc(EB.fem.df, FF, fatHEI, "Correlation - Food fussiness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X fatHEI
    corrfunc(EB.fem.df, FR, fatHEI, "Correlation - Food Responsiveness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X fatHEI
    corrfunc(EB.fem.df, SE, fatHEI, "Correlation - Slowness in Eating X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X fatHEI
    corrfunc(EB.fem.df, H, fatHEI, "Correlation - Hunger X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X fatHEI
    corrfunc(EB.fem.df, SR, fatHEI, "Correlation - Satiety Responsiveness X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X fatHEI
    corrfunc(EB.fem.df, emo, fatHEI, "Correlation - Emo X Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sweet + fat sHEI score

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugarHEI + fatHEI and traits
    ## Age X (sugarHEI + fatHEI)
    corrfunc(EB.df, age, (sugarHEI + fatHEI), "Correlation - Age X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X (sugarHEI + fatHEI)
    corrfunc(EB.df, BMI, (sugarHEI + fatHEI), "Correlation - BMI X Sweet +Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X (sugarHEI + fatHEI)
    corrfunc(EB.df, sex, (sugarHEI + fatHEI), "Correlation - Sex X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X (sugarHEI + fatHEI)
    corrfunc(EB.df, sweet.liking, (sugarHEI + fatHEI), "Correlation - Sweet Liking X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X (sugarHEI + fatHEI)
    corrfunc(EB.df, emotional, (sugarHEI + fatHEI), "Correlation - Emotional Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X (sugarHEI + fatHEI)
    corrfunc(EB.df, uncontrolled, (sugarHEI + fatHEI), "Correlation - Uncontrolled Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X (sugarHEI + fatHEI)
    corrfunc(EB.df, restraint, (sugarHEI + fatHEI), "Correlation - Dietary Restraint X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X (sugarHEI + fatHEI)
    corrfunc(EB.df, EF, (sugarHEI + fatHEI), "Correlation - Enjoyment of Food X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X (sugarHEI + fatHEI)
    corrfunc(EB.df, EOE, (sugarHEI + fatHEI), "Correlation - Emotional Over-Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X (sugarHEI + fatHEI)
    corrfunc(EB.df, EUE, (sugarHEI + fatHEI), "Correlation - Emotional Under-Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X (sugarHEI + fatHEI)
    corrfunc(EB.df, FF, (sugarHEI + fatHEI), "Correlation - Food fussiness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X (sugarHEI + fatHEI)
    corrfunc(EB.df, FR, (sugarHEI + fatHEI), "Correlation - Food Responsiveness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X (sugarHEI + fatHEI)
    corrfunc(EB.df, SE, (sugarHEI + fatHEI), "Correlation - Slowness in Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X (sugarHEI + fatHEI)
    corrfunc(EB.df, H, (sugarHEI + fatHEI), "Correlation - Hunger X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X (sugarHEI + fatHEI)
    corrfunc(EB.df, SR, (sugarHEI + fatHEI), "Correlation - Satiety Responsiveness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X (sugarHEI + fatHEI)
    corrfunc(EB.df, emo, (sugarHEI + fatHEI), "Correlation - Emo X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sweet + fat sHEI score: females only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}

## Correlations - sugarHEI + fatHEI and traits
    ## Age X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, age, (sugarHEI + fatHEI), "Correlation - Age X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, BMI, (sugarHEI + fatHEI), "Correlation - BMI X Sweet +Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, sweet.liking, (sugarHEI + fatHEI), "Correlation - Sweet Liking X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, emotional, (sugarHEI + fatHEI), "Correlation - Emotional Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, uncontrolled, (sugarHEI + fatHEI), "Correlation - Uncontrolled Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, restraint, (sugarHEI + fatHEI), "Correlation - Dietary Restraint X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, EF, (sugarHEI + fatHEI), "Correlation - Enjoyment of Food X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, EOE, (sugarHEI + fatHEI), "Correlation - Emotional Over-Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, EUE, (sugarHEI + fatHEI), "Correlation - Emotional Under-Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, FF, (sugarHEI + fatHEI), "Correlation - Food fussiness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, FR, (sugarHEI + fatHEI), "Correlation - Food Responsiveness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, SE, (sugarHEI + fatHEI), "Correlation - Slowness in Eating X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, H, (sugarHEI + fatHEI), "Correlation - Hunger X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, SR, (sugarHEI + fatHEI), "Correlation - Satiety Responsiveness X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X (sugarHEI + fatHEI)
    corrfunc(EB.fem.df, emo, (sugarHEI + fatHEI), "Correlation - Emo X Sweet + Fat Score")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sHEI

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}
## Correlations - sHEI and traits
    ## Age X sHEI
    corrfunc(EB.df, age, sHEI, "Correlation - Age X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sHEI
    corrfunc(EB.df, BMI, sHEI, "Correlation - BMI X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X sHEI
    corrfunc(EB.df, sex, sHEI, "Correlation - Sex X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X sHEI
    corrfunc(EB.df, sweet.liking, sHEI, "Correlation - Sweet Liking X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X sugar intake
    corrfunc(EB.df, ssb.day, sHEI, "Correlation - SSB X sHEI")    
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sHEI
    corrfunc(EB.df, emotional, sHEI, "Correlation - Emotional Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sHEI
    corrfunc(EB.df, uncontrolled, sHEI, "Correlation - Uncontrolled Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sHEI
    corrfunc(EB.df, restraint, sHEI, "Correlation - Dietary Restraint X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sHEI
    corrfunc(EB.df, EF, sHEI, "Correlation - Enjoyment of Food X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sHEI
    corrfunc(EB.df, EOE, sHEI, "Correlation - Emotional Over-Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sHEI
    corrfunc(EB.df, EUE, sHEI, "Correlation - Emotional Under-Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sHEI
    corrfunc(EB.df, FF, sHEI, "Correlation - Food fussiness X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sHEI
    corrfunc(EB.df, FR, sHEI, "Correlation - Food Responsiveness X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X sHEI
    corrfunc(EB.df, SE, sHEI, "Correlation - Slowness in Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X sHEI
    corrfunc(EB.df, H, sHEI, "Correlation - Hunger X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X sHEI
    corrfunc(EB.df, SR, sHEI, "Correlation - Satiety Responsiveness X sHEI")    
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sHEI
    corrfunc(EB.df, emo, sHEI, "Correlation - Emo X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - sHEI: females only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}
## Correlations - sHEI and traits
    ## Age X sHEI
    corrfunc(EB.fem.df, age, sHEI, "Correlation - Age X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X sHEI
    corrfunc(EB.fem.df, BMI, sHEI, "Correlation - BMI X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X sHEI
    corrfunc(EB.fem.df, sweet.liking, sHEI, "Correlation - Sweet Liking X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X sHEI
    corrfunc(EB.fem.df, ssb.day, sHEI, "Correlation - SSB X sHEI") 
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X sHEI
    corrfunc(EB.fem.df, emotional, sHEI, "Correlation - Emotional Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X sHEI
    corrfunc(EB.fem.df, uncontrolled, sHEI, "Correlation - Uncontrolled Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X sHEI
    corrfunc(EB.fem.df, restraint, sHEI, "Correlation - Dietary Restraint X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X sHEI
    corrfunc(EB.fem.df, EF, sHEI, "Correlation - Enjoyment of Food X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X sHEI
    corrfunc(EB.fem.df, EOE, sHEI, "Correlation - Emotional Over-Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sHEI
    corrfunc(EB.fem.df, EUE, sHEI, "Correlation - Emotional Under-Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X sHEI
    corrfunc(EB.fem.df, FF, sHEI, "Correlation - Food fussiness X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X sHEI
    corrfunc(EB.fem.df, FR, sHEI, "Correlation - Food Responsiveness X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sHEI
    corrfunc(EB.fem.df, SE, sHEI, "Correlation - Slowness in Eating X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sHEI
    corrfunc(EB.fem.df, H, sHEI, "Correlation - Hunger X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X sHEI
    corrfunc(EB.fem.df, SR, sHEI, "Correlation - Satiety Responsiveness X sHEI")    
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X sHEI
    corrfunc(EB.fem.df, emo, sHEI, "Correlation - Emo X sHEI")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - body appreciation

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}
## Correlations - BAS and traits
    ## Age X BAS
    corrfunc(EB.df, age, BAS, "Correlation - Age X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X BAS
    corrfunc(EB.df, BMI, BAS, "Correlation - BMI X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sex X BAS
    corrfunc(EB.df, sex, BAS, "Correlation - Sex X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X BAS
    corrfunc(EB.df, BAS, sweet.liking, "Correlation - Sweet Liking X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X BAS
    corrfunc(EB.df, ssb.day, BAS, "Correlation - SSB X BAS") 
## `geom_smooth()` using formula = 'y ~ x'

    ## Sugar intake X BAS
    corrfunc(EB.df, BAS, sugar.intake, "Correlation - Sugar Intake X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X BAS
    corrfunc(EB.df,  BAS, emotional, "Correlation - Emotional Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X BAS
    corrfunc(EB.df, BAS, uncontrolled,  "Correlation - Uncontrolled Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X BAS
    corrfunc(EB.df, BAS, restraint,  "Correlation - Dietary Restraint X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X BAS
    corrfunc(EB.df, BAS, EF, "Correlation - Enjoyment of Food X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X BAS
    corrfunc(EB.df, BAS, EOE, "Correlation - Emotional Over-Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X BAS
    corrfunc(EB.df, BAS, EUE, "Correlation - Emotional Under-Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X BAS
    corrfunc(EB.df, BAS, FF, "Correlation - Food fussiness X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X BAS
    corrfunc(EB.df, BAS, FR, "Correlation - Food Responsiveness X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X BAS
    corrfunc(EB.df, BAS, SE, "Correlation - Slowness in Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X BAS
    corrfunc(EB.df, BAS, H, "Correlation - Hunger X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X BAS
    corrfunc(EB.df, BAS, SR, "Correlation - Satiety Responsiveness X BAS")    
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X BAS
    corrfunc(EB.df, BAS, emo, "Correlation - Emo X BAS")
## `geom_smooth()` using formula = 'y ~ x'

Correlations - body appreciation: female only

## Correlation Function
corrfunc <- function(data, Cor1, Cor2, title) {
  ggplot(data = data, aes(x = {{Cor1}}, y = {{Cor2}})) +
  geom_point()+
  geom_smooth(method = lm, se = FALSE)+
  ggtitle(title) +
  stat_cor(method = "pearson") +
  theme_light() 
}
## Correlations - BAS and traits
    ## Age X BMI
    corrfunc(EB.fem.df, age, BMI, "Correlation - Age X BMI")
## `geom_smooth()` using formula = 'y ~ x'

    ## Age X BAS
    corrfunc(EB.fem.df, age, BAS, "Correlation - Age X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## BMI X BAS
    corrfunc(EB.fem.df, BMI, BAS, "Correlation - BMI X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Sweet liking X BAS
    corrfunc(EB.fem.df, BAS, sweet.liking, "Correlation - Sweet Liking X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## SSB X BAS
    corrfunc(EB.fem.df, ssb.day, BAS, "Correlation - SSB X BAS") 
## `geom_smooth()` using formula = 'y ~ x'

    ## Sugar intake X BAS
    corrfunc(EB.fem.df, BAS, sugar.intake, "Correlation - Sugar Intake X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional eating X BAS
    corrfunc(EB.fem.df,  BAS, emotional, "Correlation - Emotional Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Uncontrolled eating X BAS
    corrfunc(EB.fem.df, BAS, uncontrolled,  "Correlation - Uncontrolled Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Restraint X BAS
    corrfunc(EB.fem.df, BAS, restraint,  "Correlation - Dietary Restraint X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Enjoyment of food X BAS
    corrfunc(EB.fem.df, BAS, EF, "Correlation - Enjoyment of Food X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional over-eating X BAS
    corrfunc(EB.fem.df, BAS, EOE, "Correlation - Emotional Over-Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional under-eating X BAS
    corrfunc(EB.fem.df, BAS, EUE, "Correlation - Emotional Under-Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Food fussiness X BAS
    corrfunc(EB.fem.df, BAS, FF, "Correlation - Food fussiness X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional food responsiveness X BAS
    corrfunc(EB.fem.df, BAS, FR, "Correlation - Food Responsiveness X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Slowness in Eating X BAS
    corrfunc(EB.fem.df, BAS, SE, "Correlation - Slowness in Eating X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Hunger X BAS
    corrfunc(EB.fem.df, BAS, H, "Correlation - Hunger X BAS")
## `geom_smooth()` using formula = 'y ~ x'

    ## Emotional Satiety Responsiveness X BAS
    corrfunc(EB.fem.df, BAS, SR, "Correlation - Satiety Responsiveness X BAS")    
## `geom_smooth()` using formula = 'y ~ x'

    ## (Emotional eating + emotional overeating) X BAS
    corrfunc(EB.fem.df, BAS, emo, "Correlation - Emo X BAS")
## `geom_smooth()` using formula = 'y ~ x'

Partial correlation - controlling for age

EB.df %>%
  ggplot(aes(age, BMI)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() ## age and BMI are not correlationed - enter both as covariates
## `geom_smooth()` using formula = 'y ~ x'

## Sweet liking and sugar intake
pcor.test(EB.df$sweet.liking, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##   estimate      p.value statistic   n gp  Method
## 1 0.465998 1.507612e-06  5.133431 100  3 pearson
## Emotional eating 
pcor.test(EB.df$emotional, EB.df$sweet.liking, EB.df[,c("age", "sex", "BMI")])
##      estimate  p.value  statistic   n gp  Method
## 1 -0.09480028 0.355667 -0.9281791 100  3 pearson
pcor.test(EB.df$emotional, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##      estimate  p.value  statistic   n gp  Method
## 1 -0.09887438 0.335277 -0.9684537 100  3 pearson
pcor.test(EB.df$emotional, EB.df$fatHEI, EB.df[,c("age", "sex", "BMI")])
##   estimate   p.value statistic   n gp  Method
## 1 0.113663 0.2676304  1.115077 100  3 pearson
pcor.test(EB.df$emotional, EB.df$SuFatHEI, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.06237228 0.5439016 -0.6091158 100  3 pearson
pcor.test(EB.df$emotional, EB.df$sHEI, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.03478036 0.7352061 -0.3392022 100  3 pearson
## Uncontrolled eating 
pcor.test(EB.df$uncontrolled, EB.df$sweet.liking, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.05640277 0.5831848 0.5506228 100  3 pearson
pcor.test(EB.df$uncontrolled, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.04571979 0.6565489 0.4460878 100  3 pearson
pcor.test(EB.df$uncontrolled, EB.df$fatHEI, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.04609799 0.6538895 0.4497858 100  3 pearson
pcor.test(EB.df$uncontrolled, EB.df$SuFatHEI, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 -0.1316364 0.1987006 -1.294296 100  3 pearson
pcor.test(EB.df$uncontrolled, EB.df$sHEI, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.04878689 0.6351085 -0.4760827 100  3 pearson
## Dietary restrain 
pcor.test(EB.df$restraint, EB.df$sweet.liking, EB.df[,c("age", "sex", "BMI")])
##     estimate     p.value statistic   n gp  Method
## 1 -0.2667175 0.008270309 -2.697353 100  3 pearson
pcor.test(EB.df$restraint, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##     estimate     p.value statistic   n gp  Method
## 1 -0.2857745 0.004546923   -2.9066 100  3 pearson
pcor.test(EB.df$restraint, EB.df$fatHEI, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.07096717 0.4897187 0.6934509 100  3 pearson
pcor.test(EB.df$restraint, EB.df$SuFatHEI, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.05265021 0.6085266 0.5138836 100  3 pearson
pcor.test(EB.df$restraint, EB.df$sHEI, EB.df[,c("age", "sex", "BMI")])
##    estimate     p.value statistic   n gp  Method
## 1 0.2652879 0.008635819  2.681798 100  3 pearson
## EOE
pcor.test(EB.df$EOE, EB.df$sweet.liking, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 -0.0894113 0.3837926 -0.874978 100  3 pearson
pcor.test(EB.df$EOE, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value  statistic   n gp  Method
## 1 0.00718915 0.9442829 0.07007298 100  3 pearson
pcor.test(EB.df$EOE, EB.df$fatHEI, EB.df[,c("age", "sex", "BMI")])
##    estimate   p.value statistic   n gp  Method
## 1 0.1010441 0.3247268 0.9899222 100  3 pearson
pcor.test(EB.df$EOE, EB.df$SuFatHEI, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value  statistic   n gp  Method
## 1 -0.1007911 0.3259457 -0.9874187 100  3 pearson
pcor.test(EB.df$EOE, EB.df$sHEI, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.03965949 0.6997271 -0.3868573 100  3 pearson
## BAS
pcor.test(EB.df$BAS, EB.df$sweet.liking, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.04930358 0.6315254  0.481137 100  3 pearson
pcor.test(EB.df$BAS, EB.df$sugar.intake, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.08487779 0.4084608 -0.8302825 100  3 pearson
pcor.test(EB.df$BAS, EB.df$fatHEI, EB.df[,c("age", "sex", "BMI")])
##    estimate    p.value statistic   n gp  Method
## 1 0.1966785 0.05350142  1.955174 100  3 pearson
pcor.test(EB.df$BAS, EB.df$SuFatHEI, EB.df[,c("age", "sex", "BMI")])
##    estimate    p.value statistic   n gp  Method
## 1 0.1692342 0.09749282  1.673631 100  3 pearson
pcor.test(EB.df$BAS, EB.df$sHEI, EB.df[,c("age", "sex", "BMI")])
##      estimate   p.value  statistic   n gp  Method
## 1 -0.01043725 0.9191813 -0.1017352 100  3 pearson
## BAS with eating behavior traits
pcor.test(EB.df$BAS, EB.df$emotional, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 -0.1084418 0.2903727  -1.06323 100  3 pearson
pcor.test(EB.df$BAS, EB.df$uncontrolled, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 0.07149773 0.4864703 0.6986617 100  3 pearson
pcor.test(EB.df$BAS, EB.df$restraint, EB.df[,c("age", "sex", "BMI")])
##     estimate   p.value statistic   n gp  Method
## 1 -0.1556176 0.1279901 -1.535479 100  3 pearson
pcor.test(EB.df$BAS, EB.df$EOE, EB.df[,c("age", "sex", "BMI")])
##    estimate   p.value statistic   n gp  Method
## 1 -0.124501 0.2243545 -1.223001 100  3 pearson

Moderator analysis - sugar intake

## Sweet liking and sugar intake
SL.M1 <- lm(sugar.intake ~ sweet.liking, EB.df)
summary(SL.M1)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -346.79 -154.26  -24.81   88.69  700.99 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  255.0548    34.3154   7.433 4.03e-11 ***
## sweet.liking   3.9993     0.8066   4.958 2.98e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 218.9 on 98 degrees of freedom
## Multiple R-squared:  0.2006, Adjusted R-squared:  0.1924 
## F-statistic: 24.58 on 1 and 98 DF,  p-value: 2.985e-06
SL.M2 <- lm(sugar.intake ~ sweet.liking + sweet.liking*emotional + emotional, EB.df)
summary(SL.M2)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * emotional + 
##     emotional, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -345.55 -144.61  -34.11   71.36  701.38 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)            350.54916  115.84527   3.026  0.00318 **
## sweet.liking             3.12360    2.58097   1.210  0.22916   
## emotional               -8.08693    9.45549  -0.855  0.39453   
## sweet.liking:emotional   0.07921    0.20880   0.379  0.70525   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 219.7 on 96 degrees of freedom
## Multiple R-squared:  0.211,  Adjusted R-squared:  0.1863 
## F-statistic: 8.557 on 3 and 96 DF,  p-value: 4.307e-05
SL.M3 <- lm(sugar.intake ~ sweet.liking + sweet.liking*EOE + EOE, EB.df)
summary(SL.M3)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * EOE + 
##     EOE, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -353.33 -156.36  -23.85   85.50  695.58 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)   
## (Intercept)      291.6343   102.6919   2.840  0.00551 **
## sweet.liking       2.9448     2.4007   1.227  0.22297   
## EOE               -3.7616     9.9286  -0.379  0.70563   
## sweet.liking:EOE   0.1073     0.2299   0.467  0.64186   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 220.9 on 96 degrees of freedom
## Multiple R-squared:  0.2024, Adjusted R-squared:  0.1774 
## F-statistic: 8.119 on 3 and 96 DF,  p-value: 7.121e-05
SL.M4 <- lm(sugar.intake ~ sweet.liking + sweet.liking*BMI + BMI, EB.df)
summary(SL.M4)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * BMI + 
##     BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -347.13 -144.79  -30.77   83.20  695.00 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)      384.34072  188.49157   2.039   0.0442 *
## sweet.liking       3.14938    4.08253   0.771   0.4423  
## BMI               -5.57759    8.10800  -0.688   0.4932  
## sweet.liking:BMI   0.04517    0.17229   0.262   0.7937  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 219.7 on 96 degrees of freedom
## Multiple R-squared:  0.2113, Adjusted R-squared:  0.1866 
## F-statistic: 8.571 on 3 and 96 DF,  p-value: 4.239e-05
SL.M5 <- lm(sugar.intake ~ sweet.liking + sweet.liking*emo + emo, EB.df)
summary(SL.M5)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * emo + 
##     emo, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -344.55 -146.82  -30.71   79.85  701.02 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)   
## (Intercept)      332.82421  120.03963   2.773  0.00668 **
## sweet.liking       2.85944    2.70356   1.058  0.29287   
## emo               -3.61869    5.36379  -0.675  0.50152   
## sweet.liking:emo   0.05404    0.11967   0.452  0.65261   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 220.5 on 96 degrees of freedom
## Multiple R-squared:  0.205,  Adjusted R-squared:  0.1801 
## F-statistic:  8.25 on 3 and 96 DF,  p-value: 6.121e-05
SL.M6 <- lm(sugar.intake ~ sweet.liking + sweet.liking*emo + sweet.liking*BMI + emo + BMI, EB.df)
summary(SL.M6)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * emo + 
##     sweet.liking * BMI + emo + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -349.74 -149.48  -25.56   85.47  692.51 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)      439.01800  215.45963   2.038   0.0444 *
## sweet.liking       1.94654    4.75838   0.409   0.6834  
## emo               -2.89567    5.43769  -0.533   0.5956  
## BMI               -5.25931    8.28122  -0.635   0.5269  
## sweet.liking:emo   0.06092    0.12071   0.505   0.6150  
## sweet.liking:BMI   0.04053    0.17407   0.233   0.8164  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 221.6 on 94 degrees of freedom
## Multiple R-squared:  0.2137, Adjusted R-squared:  0.1719 
## F-statistic:  5.11 on 5 and 94 DF,  p-value: 0.0003448
SL.M7 <- lm(sugar.intake ~ sweet.liking + sweet.liking*EOE + sweet.liking*BMI + EOE + BMI, EB.df)
summary(SL.M7)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * EOE + 
##     sweet.liking * BMI + EOE + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -360.77 -158.13  -19.94   78.49  683.80 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)      401.24627  198.36061   2.023   0.0459 *
## sweet.liking       2.37891    4.36199   0.545   0.5868  
## EOE               -1.88191   10.22675  -0.184   0.8544  
## BMI               -5.50164    8.40482  -0.655   0.5143  
## sweet.liking:EOE   0.11999    0.23643   0.508   0.6130  
## sweet.liking:BMI   0.02852    0.17776   0.160   0.8729  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 221.5 on 94 degrees of freedom
## Multiple R-squared:  0.215,  Adjusted R-squared:  0.1732 
## F-statistic: 5.149 on 5 and 94 DF,  p-value: 0.0003221
SL.M8 <- lm(sugar.intake ~ BAS, EB.df)
summary(SL.M8)
## 
## Call:
## lm(formula = sugar.intake ~ BAS, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -291.39 -134.60 -105.37   72.36  823.32 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  474.967    109.226   4.348 3.36e-05 ***
## BAS           -2.435      2.918  -0.835    0.406    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 243.9 on 98 degrees of freedom
## Multiple R-squared:  0.007059,   Adjusted R-squared:  -0.003073 
## F-statistic: 0.6967 on 1 and 98 DF,  p-value: 0.4059
SL.M9 <- lm(sugar.intake ~ sweet.liking + sweet.liking*BAS + BAS, EB.df)
summary(SL.M9)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * BAS + 
##     BAS, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -347.92 -147.42  -30.26   97.34  694.88 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)   
## (Intercept)      521.7567   176.7195   2.952  0.00396 **
## sweet.liking      -1.8943     4.2428  -0.446  0.65627   
## BAS               -6.9940     4.5598  -1.534  0.12836   
## sweet.liking:BAS   0.1535     0.1090   1.408  0.16240   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 218.4 on 96 degrees of freedom
## Multiple R-squared:  0.2202, Adjusted R-squared:  0.1959 
## F-statistic: 9.038 on 3 and 96 DF,  p-value: 2.496e-05
SL.M10 <- lm(sugar.intake ~ sweet.liking + sweet.liking*restraint + restraint, EB.df)
summary(SL.M10)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * restraint + 
##     restraint, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -333.71 -125.46  -32.36   80.11  673.83 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)            253.15978  144.81686   1.748  0.08364 . 
## sweet.liking             8.89468    3.24805   2.738  0.00736 **
## restraint                0.08851    9.57372   0.009  0.99264   
## sweet.liking:restraint  -0.36495    0.22097  -1.652  0.10189   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 212.7 on 96 degrees of freedom
## Multiple R-squared:  0.2604, Adjusted R-squared:  0.2373 
## F-statistic: 11.27 on 3 and 96 DF,  p-value: 2.13e-06
SL.M11 <- lm(sugar.intake ~ sweet.liking + sweet.liking*restraint + restraint + BAS + sweet.liking*BAS, EB.df)
summary(SL.M11)
## 
## Call:
## lm(formula = sugar.intake ~ sweet.liking + sweet.liking * restraint + 
##     restraint + BAS + sweet.liking * BAS, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -349.51 -127.23  -44.10   88.05  674.68 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)  
## (Intercept)            551.0497   248.4624   2.218    0.029 *
## sweet.liking             4.0936     6.0008   0.682    0.497  
## restraint               -2.6892     9.7740  -0.275    0.784  
## BAS                     -6.7953     4.5301  -1.500    0.137  
## sweet.liking:restraint  -0.3202     0.2288  -1.399    0.165  
## sweet.liking:BAS         0.1068     0.1098   0.973    0.333  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 212.2 on 94 degrees of freedom
## Multiple R-squared:  0.2792, Adjusted R-squared:  0.2408 
## F-statistic: 7.282 on 5 and 94 DF,  p-value: 8.368e-06

Moderator analysis - SSB intake

## Sweet liking and sugar intake
SSB.M1 <- lm(ssb.day ~ sweet.liking , EB.df)
summary(SSB.M1)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3153 -0.7606 -0.2281  0.3476  4.7836 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  1.188824   0.174325    6.82 7.56e-10 ***
## sweet.liking 0.017126   0.004097    4.18 6.35e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.112 on 98 degrees of freedom
## Multiple R-squared:  0.1513, Adjusted R-squared:  0.1426 
## F-statistic: 17.47 on 1 and 98 DF,  p-value: 6.35e-05
SSB.M2 <- lm(ssb.day ~ sweet.liking + sweet.liking*emotional + emotional, EB.df)
summary(SSB.M2)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * emotional + 
##     emotional, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4098 -0.7424 -0.2106  0.3682  4.8012 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)  
## (Intercept)             1.499617   0.586568   2.557   0.0121 *
## sweet.liking            0.019474   0.013068   1.490   0.1395  
## emotional              -0.025893   0.047877  -0.541   0.5899  
## sweet.liking:emotional -0.000170   0.001057  -0.161   0.8726  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.112 on 96 degrees of freedom
## Multiple R-squared:  0.1679, Adjusted R-squared:  0.1419 
## F-statistic: 6.456 on 3 and 96 DF,  p-value: 0.0004995
SSB.M3 <- lm(ssb.day ~ sweet.liking + sweet.liking*EOE + EOE, EB.df)
summary(SSB.M3)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * EOE + EOE, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3093 -0.7866 -0.2271  0.3524  4.7814 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       1.3472200  0.5219862   2.581   0.0114 *
## sweet.liking      0.0143688  0.0122029   1.177   0.2419  
## EOE              -0.0162623  0.0504676  -0.322   0.7480  
## sweet.liking:EOE  0.0002839  0.0011687   0.243   0.8086  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.123 on 96 degrees of freedom
## Multiple R-squared:  0.1522, Adjusted R-squared:  0.1257 
## F-statistic: 5.746 on 3 and 96 DF,  p-value: 0.001169
SSB.M4 <- lm(ssb.day ~ sweet.liking + sweet.liking*BMI + BMI, EB.df)
summary(SSB.M4)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * BMI + BMI, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3362 -0.7569 -0.2118  0.3572  4.7694 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       1.6413009  0.9626302   1.705   0.0914 .
## sweet.liking      0.0105108  0.0208496   0.504   0.6153  
## BMI              -0.0196951  0.0414077  -0.476   0.6354  
## sweet.liking:BMI  0.0003010  0.0008799   0.342   0.7331  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.122 on 96 degrees of freedom
## Multiple R-squared:  0.1538, Adjusted R-squared:  0.1273 
## F-statistic: 5.814 on 3 and 96 DF,  p-value: 0.001077
SSB.M5 <- lm(ssb.day ~ sweet.liking + sweet.liking*emo + emo, EB.df)
summary(SSB.M5)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * emo + emo, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3787 -0.7679 -0.1844  0.3105  4.8091 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       1.460e+00  6.091e-01   2.398   0.0184 *
## sweet.liking      1.678e-02  1.372e-02   1.223   0.2243  
## emo              -1.253e-02  2.722e-02  -0.461   0.6462  
## sweet.liking:emo  2.474e-05  6.072e-04   0.041   0.9676  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.119 on 96 degrees of freedom
## Multiple R-squared:  0.1579, Adjusted R-squared:  0.1316 
## F-statistic: 6.002 on 3 and 96 DF,  p-value: 0.0008591
SSB.M6 <- lm(ssb.day ~ sweet.liking + sweet.liking*emo + sweet.liking*BMI + emo + BMI, EB.df)
summary(SSB.M6)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * emo + sweet.liking * 
##     BMI + emo + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.4326 -0.7574 -0.2032  0.3325  4.8011 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)
## (Intercept)       1.778e+00  1.099e+00   1.619    0.109
## sweet.liking      1.012e-02  2.426e-02   0.417    0.677
## emo              -1.175e-02  2.773e-02  -0.424    0.673
## BMI              -1.467e-02  4.223e-02  -0.348    0.729
## sweet.liking:emo  1.876e-05  6.155e-04   0.030    0.976
## sweet.liking:BMI  2.965e-04  8.876e-04   0.334    0.739
## 
## Residual standard error: 1.13 on 94 degrees of freedom
## Multiple R-squared:  0.159,  Adjusted R-squared:  0.1143 
## F-statistic: 3.555 on 5 and 94 DF,  p-value: 0.005468
SSB.M7 <- lm(ssb.day ~ sweet.liking + sweet.liking*EOE + sweet.liking*BMI + EOE + BMI, EB.df)
summary(SSB.M7)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * EOE + sweet.liking * 
##     BMI + EOE + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.3137 -0.7720 -0.2138  0.3702  4.7627 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       1.7038197  1.0151811   1.678   0.0966 .
## sweet.liking      0.0090658  0.0223241   0.406   0.6856  
## EOE              -0.0109859  0.0523390  -0.210   0.8342  
## BMI              -0.0177485  0.0430146  -0.413   0.6808  
## sweet.liking:EOE  0.0002428  0.0012100   0.201   0.8414  
## sweet.liking:BMI  0.0002605  0.0009097   0.286   0.7753  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.133 on 94 degrees of freedom
## Multiple R-squared:  0.1542, Adjusted R-squared:  0.1092 
## F-statistic: 3.427 on 5 and 94 DF,  p-value: 0.006885
SSB.M8 <- lm(ssb.day ~ BAS, EB.df)
summary(SSB.M8)
## 
## Call:
## lm(formula = ssb.day ~ BAS, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -0.9024 -0.7573 -0.6663  0.2944  5.3042 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2.108949   0.539162   3.912 0.000169 ***
## BAS         -0.009837   0.014402  -0.683 0.496217    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.204 on 98 degrees of freedom
## Multiple R-squared:  0.004738,   Adjusted R-squared:  -0.005418 
## F-statistic: 0.4665 on 1 and 98 DF,  p-value: 0.4962
SSB.M9 <- lm(ssb.day ~ sweet.liking + sweet.liking*BAS + BAS, EB.df)
summary(SSB.M9)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * BAS + BAS, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.2884 -0.7722 -0.1648  0.2447  4.7500 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       2.3566703  0.9005025   2.617   0.0103 *
## sweet.liking     -0.0094853  0.0216199  -0.439   0.6618  
## BAS              -0.0305967  0.0232353  -1.317   0.1910  
## sweet.liking:BAS  0.0006935  0.0005555   1.248   0.2150  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.113 on 96 degrees of freedom
## Multiple R-squared:  0.1671, Adjusted R-squared:  0.1411 
## F-statistic:  6.42 on 3 and 96 DF,  p-value: 0.0005213
SSB.M10 <- lm(ssb.day ~ sweet.liking + sweet.liking*restraint + restraint, EB.df)
summary(SSB.M10)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * restraint + 
##     restraint, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.6136 -0.6630 -0.2688  0.3599  4.5599 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)   
## (Intercept)             0.781144   0.744876   1.049  0.29695   
## sweet.liking            0.044587   0.016707   2.669  0.00894 **
## restraint               0.027531   0.049243   0.559  0.57740   
## sweet.liking:restraint -0.001999   0.001137  -1.758  0.08186 . 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 1.094 on 96 degrees of freedom
## Multiple R-squared:  0.1951, Adjusted R-squared:  0.1699 
## F-statistic: 7.755 on 3 and 96 DF,  p-value: 0.0001085
SSB.M11 <- lm(ssb.day ~ sweet.liking + sweet.liking*restraint + restraint + BAS + sweet.liking*BAS, EB.df)
summary(SSB.M11)
## 
## Call:
## lm(formula = ssb.day ~ sweet.liking + sweet.liking * restraint + 
##     restraint + BAS + sweet.liking * BAS, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.5931 -0.6582 -0.2660  0.3257  4.5857 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)
## (Intercept)             1.9768017  1.2847550   1.539    0.127
## sweet.liking            0.0245855  0.0310291   0.792    0.430
## restraint               0.0162719  0.0505396   0.322    0.748
## BAS                    -0.0272095  0.0234245  -1.162    0.248
## sweet.liking:restraint -0.0018079  0.0011831  -1.528    0.130
## sweet.liking:BAS        0.0004442  0.0005679   0.782    0.436
## 
## Residual standard error: 1.097 on 94 degrees of freedom
## Multiple R-squared:  0.2072, Adjusted R-squared:  0.165 
## F-statistic: 4.913 on 5 and 94 DF,  p-value: 0.0004874

Moderator anaysis - fat X sugar intake

## Sweet liking and sugar intake
SF.M1 <- lm(SuFatHEI ~ sweet.liking, EB.df)
summary(SF.M1)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking, data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.014 -3.346  1.058  2.744  5.198 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   7.99995    0.50934  15.707   <2e-16 ***
## sweet.liking -0.03027    0.01197  -2.528   0.0131 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.249 on 98 degrees of freedom
## Multiple R-squared:  0.06123,    Adjusted R-squared:  0.05165 
## F-statistic: 6.391 on 1 and 98 DF,  p-value: 0.01307
SF.M2 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*emotional + emotional, EB.df)
summary(SF.M2)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * emotional + 
##     emotional, data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.053 -3.270  1.054  2.654  5.250 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             7.9704848  1.7301175   4.607 1.26e-05 ***
## sweet.liking           -0.0349877  0.0385460  -0.908    0.366    
## emotional               0.0020853  0.1412151   0.015    0.988    
## sweet.liking:emotional  0.0003864  0.0031184   0.124    0.902    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.281 on 96 degrees of freedom
## Multiple R-squared:  0.06197,    Adjusted R-squared:  0.03266 
## F-statistic: 2.114 on 3 and 96 DF,  p-value: 0.1035
SF.M3 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*EOE + EOE, EB.df)
summary(SF.M3)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * EOE + EOE, 
##     data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.389 -3.200  1.060  2.752  5.307 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       7.281563   1.521836   4.785 6.19e-06 ***
## sweet.liking     -0.006697   0.035577  -0.188    0.851    
## EOE               0.073915   0.147137   0.502    0.617    
## sweet.liking:EOE -0.002392   0.003407  -0.702    0.484    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.273 on 96 degrees of freedom
## Multiple R-squared:  0.06631,    Adjusted R-squared:  0.03713 
## F-statistic: 2.272 on 3 and 96 DF,  p-value: 0.08504
SF.M4 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*BMI + BMI, EB.df)
summary(SF.M4)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * BMI + BMI, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.4763 -3.1628  0.9551  2.5533  5.2626 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       6.605305   2.806524   2.354   0.0206 *
## sweet.liking     -0.021334   0.060786  -0.351   0.7264  
## BMI               0.060156   0.120723   0.498   0.6194  
## sweet.liking:BMI -0.000478   0.002565  -0.186   0.8526  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.27 on 96 degrees of freedom
## Multiple R-squared:  0.06798,    Adjusted R-squared:  0.03885 
## F-statistic: 2.334 on 3 and 96 DF,  p-value: 0.07879
SF.M5 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*emo + emo, EB.df)
summary(SF.M5)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * emo + emo, 
##     data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.996 -3.437  1.076  2.709  5.221 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       7.5345834  1.7859024   4.219 5.57e-05 ***
## sweet.liking     -0.0194452  0.0402225  -0.483    0.630    
## emo               0.0217645  0.0798003   0.273    0.786    
## sweet.liking:emo -0.0005038  0.0017803  -0.283    0.778    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.281 on 96 degrees of freedom
## Multiple R-squared:  0.06203,    Adjusted R-squared:  0.03272 
## F-statistic: 2.116 on 3 and 96 DF,  p-value: 0.1032
SF.M6 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*emo + sweet.liking*BMI + emo + BMI, EB.df)
summary(SF.M6)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * emo + sweet.liking * 
##     BMI + emo + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.4776 -3.2364  0.9417  2.5837  5.3446 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       6.2452697  3.2101256   1.945   0.0547 .
## sweet.liking     -0.0095953  0.0708950  -0.135   0.8926  
## emo               0.0125532  0.0810160   0.155   0.8772  
## BMI               0.0641925  0.1233816   0.520   0.6041  
## sweet.liking:emo -0.0005957  0.0017985  -0.331   0.7412  
## sweet.liking:BMI -0.0004370  0.0025934  -0.168   0.8666  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.302 on 94 degrees of freedom
## Multiple R-squared:  0.06968,    Adjusted R-squared:  0.02019 
## F-statistic: 1.408 on 5 and 94 DF,  p-value: 0.2285
SF.M7 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*EOE + sweet.liking*BMI + EOE + BMI, EB.df)
summary(SF.M7)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * EOE + sweet.liking * 
##     BMI + EOE + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.7406 -3.1472  0.9022  2.5350  5.4532 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)  
## (Intercept)       6.1853257  2.9482886   2.098   0.0386 *
## sweet.liking     -0.0047935  0.0648335  -0.074   0.9412  
## EOE               0.0542061  0.1520029   0.357   0.7222  
## BMI               0.0551850  0.1249231   0.442   0.6597  
## sweet.liking:EOE -0.0026090  0.0035141  -0.742   0.4597  
## sweet.liking:BMI -0.0001033  0.0026420  -0.039   0.9689  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.291 on 94 degrees of freedom
## Multiple R-squared:  0.07563,    Adjusted R-squared:  0.02646 
## F-statistic: 1.538 on 5 and 94 DF,  p-value: 0.1855
SF.M8 <- lm(SuFatHEI ~ BAS, EB.df)
summary(SF.M8)
## 
## Call:
## lm(formula = SuFatHEI ~ BAS, data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -5.680 -3.033  1.285  2.479  5.791 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  5.30113    1.49093   3.556 0.000583 ***
## BAS          0.04678    0.03983   1.175 0.242988    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.33 on 98 degrees of freedom
## Multiple R-squared:  0.01388,    Adjusted R-squared:  0.003821 
## F-statistic:  1.38 on 1 and 98 DF,  p-value: 0.243
SF.M9 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*BAS + BAS, EB.df)
summary(SF.M9)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * BAS + BAS, 
##     data = EB.df)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -6.091 -3.168  1.010  2.737  5.009 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)   
## (Intercept)       7.1041313  2.6391563   2.692  0.00838 **
## sweet.liking     -0.0482314  0.0633629  -0.761  0.44841   
## BAS               0.0248448  0.0680970   0.365  0.71603   
## sweet.liking:BAS  0.0004883  0.0016281   0.300  0.76486   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.262 on 96 degrees of freedom
## Multiple R-squared:  0.07303,    Adjusted R-squared:  0.04406 
## F-statistic: 2.521 on 3 and 96 DF,  p-value: 0.06245
SF.M10 <- lm(SuFatHEI ~ sweet.liking + sweet.liking*restraint + restraint, EB.df)
summary(SF.M10)
## 
## Call:
## lm(formula = SuFatHEI ~ sweet.liking + sweet.liking * restraint + 
##     restraint, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5.9122 -2.7325  0.9217  2.5376  5.1285 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            11.531328   2.176831   5.297 7.46e-07 ***
## sweet.liking           -0.136649   0.048823  -2.799   0.0062 ** 
## restraint              -0.239568   0.143908  -1.665   0.0992 .  
## sweet.liking:restraint  0.007504   0.003322   2.259   0.0261 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.197 on 96 degrees of freedom
## Multiple R-squared:  0.1093, Adjusted R-squared:  0.08142 
## F-statistic: 3.925 on 3 and 96 DF,  p-value: 0.01087

Moderator anaysis - sHEI

## Sweet liking and sHEI
sHEI.M1 <- lm(sHEI ~ sweet.liking, EB.df)
summary(sHEI.M1)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -25.066  -5.066   0.339   5.907  17.701 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  48.87649    1.41960  34.430   <2e-16 ***
## sweet.liking -0.08034    0.03337  -2.408   0.0179 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.054 on 98 degrees of freedom
## Multiple R-squared:  0.05585,    Adjusted R-squared:  0.04622 
## F-statistic: 5.797 on 1 and 98 DF,  p-value: 0.01792
sHEI.M2 <- lm(sHEI ~ sweet.liking + sweet.liking*emotional + emotional, EB.df)
summary(sHEI.M2)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * emotional + 
##     emotional, data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -23.7584  -5.6091   0.6168   6.4193  17.3723 
## 
## Coefficients:
##                         Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            46.855443   4.791118   9.780 4.42e-16 ***
## sweet.liking           -0.098450   0.106743  -0.922    0.359    
## emotional               0.168145   0.391059   0.430    0.668    
## sweet.liking:emotional  0.001339   0.008636   0.155    0.877    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.086 on 96 degrees of freedom
## Multiple R-squared:  0.06869,    Adjusted R-squared:  0.03959 
## F-statistic:  2.36 on 3 and 96 DF,  p-value: 0.07626
sHEI.M3 <- lm(sHEI ~ sweet.liking + sweet.liking*EOE + EOE, EB.df)
summary(sHEI.M3)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * EOE + EOE, 
##     data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -22.9480  -5.2532   0.6558   5.2715  16.7541 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      41.635868   4.177445   9.967   <2e-16 ***
## sweet.liking      0.044076   0.097660   0.451   0.6528    
## EOE               0.743361   0.403891   1.840   0.0688 .  
## sweet.liking:EOE -0.012817   0.009353  -1.370   0.1738    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.985 on 96 degrees of freedom
## Multiple R-squared:  0.08915,    Adjusted R-squared:  0.06069 
## F-statistic: 3.132 on 3 and 96 DF,  p-value: 0.02915
sHEI.M4 <- lm(sHEI ~ sweet.liking + sweet.liking*age + BMI, EB.df)
summary(sHEI.M4)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * age + BMI, 
##     data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -24.0786  -5.5465   0.1908   5.4337  17.7569 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      45.039476   4.531989   9.938 2.24e-16 ***
## sweet.liking     -0.030965   0.088167  -0.351   0.7262    
## age              -0.059202   0.099526  -0.595   0.5534    
## BMI               0.233618   0.136657   1.710   0.0906 .  
## sweet.liking:age -0.002450   0.002624  -0.934   0.3529    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.998 on 95 degrees of freedom
## Multiple R-squared:  0.09606,    Adjusted R-squared:  0.058 
## F-statistic: 2.524 on 4 and 95 DF,  p-value: 0.04592
sHEI.M5 <- lm(sHEI ~ sweet.liking + sweet.liking*emo + emo, EB.df)
summary(sHEI.M5)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * emo + emo, 
##     data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -23.056  -5.753   0.630   5.832  16.330 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      43.101787   4.926740   8.749 7.24e-14 ***
## sweet.liking     -0.009758   0.110961  -0.088    0.930    
## emo               0.268314   0.220144   1.219    0.226    
## sweet.liking:emo -0.003378   0.004911  -0.688    0.493    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.051 on 96 degrees of freedom
## Multiple R-squared:  0.07584,    Adjusted R-squared:  0.04696 
## F-statistic: 2.626 on 3 and 96 DF,  p-value: 0.05478
sHEI.M6 <- lm(sHEI ~ sweet.liking + sweet.liking*emo + sweet.liking*age + emo + BMI, EB.df)
summary(sHEI.M6)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * emo + sweet.liking * 
##     age + emo + BMI, data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -23.0143  -5.3928   0.7018   5.3331  16.6890 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      39.560175   6.898743   5.734 1.21e-07 ***
## sweet.liking      0.091491   0.156024   0.586    0.559    
## emo               0.237360   0.226692   1.047    0.298    
## age              -0.039068   0.102695  -0.380    0.704    
## BMI               0.220215   0.150890   1.459    0.148    
## sweet.liking:emo -0.004918   0.005060  -0.972    0.334    
## sweet.liking:age -0.002932   0.002733  -1.073    0.286    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.04 on 93 degrees of freedom
## Multiple R-squared:  0.1068, Adjusted R-squared:  0.0492 
## F-statistic: 1.854 on 6 and 93 DF,  p-value: 0.09712
sHEI.M7 <- lm(sHEI ~ sweet.liking + sweet.liking*EOE + sweet.liking*age + EOE + BMI, EB.df)
summary(sHEI.M7)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * EOE + sweet.liking * 
##     age + EOE + BMI, data = EB.df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -22.908  -5.484   1.010   5.396  17.244 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      37.931767   6.050623   6.269 1.13e-08 ***
## sweet.liking      0.148660   0.139052   1.069   0.2878    
## EOE               0.682084   0.408483   1.670   0.0983 .  
## age              -0.045517   0.100082  -0.455   0.6503    
## BMI               0.231248   0.147668   1.566   0.1207    
## sweet.liking:EOE -0.016126   0.009517  -1.694   0.0935 .  
## sweet.liking:age -0.003141   0.002680  -1.172   0.2442    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.946 on 93 degrees of freedom
## Multiple R-squared:  0.1254, Adjusted R-squared:  0.06893 
## F-statistic: 2.222 on 6 and 93 DF,  p-value: 0.04772
sHEI.M8 <- lm(sHEI ~ BAS, EB.df)
summary(sHEI.M8)
## 
## Call:
## lm(formula = sHEI ~ BAS, data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -24.9555  -5.2382   0.9438   5.9027  21.3052 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  50.2013     4.1525  12.089   <2e-16 ***
## BAS          -0.1085     0.1109  -0.978    0.331    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.273 on 98 degrees of freedom
## Multiple R-squared:  0.00966,    Adjusted R-squared:  -0.0004454 
## F-statistic: 0.9559 on 1 and 98 DF,  p-value: 0.3306
sHEI.M9 <- lm(sHEI ~ sweet.liking + sweet.liking*BAS + BAS, EB.df)
summary(sHEI.M9)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * BAS + BAS, 
##     data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -25.2450  -5.1422   0.3868   6.0415  18.1293 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      52.8264133  7.3533281   7.184 1.45e-10 ***
## sweet.liking     -0.0648864  0.1765443  -0.368    0.714    
## BAS              -0.1072637  0.1897347  -0.565    0.573    
## sweet.liking:BAS -0.0004583  0.0045362  -0.101    0.920    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.088 on 96 degrees of freedom
## Multiple R-squared:  0.06833,    Adjusted R-squared:  0.03922 
## F-statistic: 2.347 on 3 and 96 DF,  p-value: 0.07752
sHEI.M10 <- lm(sHEI ~ sweet.liking + sweet.liking*restraint + restraint, EB.df)
summary(sHEI.M10)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * restraint + 
##     restraint, data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -26.1032  -4.7145   0.3389   5.1838  17.6077 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            40.9926022  6.0804477   6.742 1.17e-09 ***
## sweet.liking           -0.0594226  0.1363762  -0.436    0.664    
## restraint               0.5366331  0.4019732   1.335    0.185    
## sweet.liking:restraint -0.0005958  0.0092779  -0.064    0.949    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.931 on 96 degrees of freedom
## Multiple R-squared:  0.1002, Adjusted R-squared:  0.07211 
## F-statistic: 3.565 on 3 and 96 DF,  p-value: 0.01701
sHEI.M11 <- lm(sHEI ~ sweet.liking + sweet.liking*restraint + restraint + BAS + sweet.liking*BAS, EB.df)
summary(sHEI.M11)
## 
## Call:
## lm(formula = sHEI ~ sweet.liking + sweet.liking * restraint + 
##     restraint + BAS + sweet.liking * BAS, data = EB.df)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -26.1437  -4.9450   0.7785   4.8715  17.8813 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            43.7355731 10.5363354   4.151 7.27e-05 ***
## sweet.liking           -0.0387800  0.2544713  -0.152    0.879    
## restraint               0.5208251  0.4144780   1.257    0.212    
## BAS                    -0.0683364  0.1921054  -0.356    0.723    
## sweet.liking:restraint -0.0011611  0.0097027  -0.120    0.905    
## sweet.liking:BAS       -0.0003875  0.0046573  -0.083    0.934    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 8.999 on 94 degrees of freedom
## Multiple R-squared:  0.1055, Adjusted R-squared:  0.05793 
## F-statistic: 2.218 on 5 and 94 DF,  p-value: 0.05887

Liking hierarchial clustering

liking.df[is.na(liking.df)] <- 0 ## replace "NA"s with 0s

res.dist <- dist(x = liking.df, method = "euclidean") ## calculate distance
Likingclust <- hclust(res.dist, method = "ward.D") ## create clusters
plot(Likingclust) ## create dendrogram to visualize clusters

fviz_nbclust(liking.df, FUNcluster = hcut, method = "wss") ## identify number of clusters

Likinggroup <- cutree(Likingclust, k = 4) ## break clusters into desirable number of groups
km.res <- kmeans(liking.df, 4, nstart = 25)
fviz_cluster(km.res, data = liking.df, ggtheme = theme_light())

## calculate mean score for each cluster
tapply(liking.df$sweet.liking, Likinggroup, mean)
##         1         2         3         4 
## 44.236442 21.605820  8.787594 44.339506
tapply(liking.df$unhealthyfat.liking, Likinggroup, mean)
##         1         2         3         4 
## 39.300000 23.552381  1.415789 38.100000
tapply(liking.df$alcohol.liking, Likinggroup, mean)
##          1          2          3          4 
##  22.333730  40.357143  -3.123684 -52.559259
tapply(liking.df$saltyfat.liking, Likinggroup, mean)
##         1         2         3         4 
## 57.461139 41.476757  8.763158 37.785648
## identify individuals within each cluster
Likeclust1 <- subset(liking.df, Likinggroup == 1)
Likeclust2 <- subset(liking.df, Likinggroup == 2)
Likeclust3 <- subset(liking.df, Likinggroup == 3)
Likeclust4 <- subset(liking.df, Likinggroup == 4)

sHEI hierarchial clustering

HEI.clust.df <- select(HEI.df, -c("ID", "sugar.intake"))
HEI.clust.df[is.na(HEI.clust.df)] <- 0 ## replace "NA"s with 0s

res.dist <- dist(x = HEI.clust.df[1:13], method = "euclidean") ## calculate distance
HEIclust <- hclust(res.dist, method = "ward.D") ## create clusters
plot(HEIclust) ## create dendrogram to visualize clusters

fviz_nbclust(HEI.clust.df, FUNcluster = hcut, method = "wss") ## identify number of clusters

HEIgroup <- cutree(HEIclust, k = 4) ## break clusters into desirable number of groups
km.res <- kmeans(HEI.clust.df[1:13], 4, nstart = 25)
fviz_cluster(km.res, data = HEI.clust.df[1:13], ggtheme = theme_light())

## calculate mean score for each cluster
tapply(HEI.clust.df$sugarHEI, HEIgroup, mean)
##        1        2        3        4 
## 2.954545 4.687500 2.592593 1.923077
tapply(HEI.clust.df$fatHEI, HEIgroup, mean)
##        1        2        3        4 
## 4.378182 3.200000 4.191111 3.370769
tapply(HEI.clust.df$SuFatHEI, HEIgroup, mean)
##        1        2        3        4 
## 7.332727 7.887500 6.783704 5.293846
tapply(HEI.clust.df$sHEI, HEIgroup, mean)
##        1        2        3        4 
## 43.37705 52.02938 53.81778 33.09615
## identify individuals within each cluster
HEIclust1 <- subset(HEI.clust.df, HEIgroup == 1)
HEIclust2 <- subset(HEI.clust.df, HEIgroup == 2)
HEIclust3 <- subset(HEI.clust.df, HEIgroup == 3)
HEIclust4 <- subset(HEI.clust.df, HEIgroup == 4)

Emotional overeating analysis

## Emotional overeating
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo       
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00  
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75  
##  Median :16.00   Median :11.00   Median :21.50  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22  
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00  
##  Max.   :24.00   Max.   :19.00   Max.   :42.00  
## 
EB.df <- EB.df %>% 
  mutate(EOE.level = case_when(
    EOE < 12 ~ "Low",
    EOE >= 12 ~ "High"))
    
EB.df %>%
  group_by(EOE.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   EOE.level [2]
##   EOE.level     n
##   <chr>     <int>
## 1 High         40
## 2 Low          60
EB.df %>% ggplot(aes(sweet.liking, sugar.intake, color = EOE.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'

## Emotional overeating: females only
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo         EOE.level        
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00   Length:100        
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75   Class :character  
##  Median :16.00   Median :11.00   Median :21.50   Mode  :character  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22                     
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00                     
##  Max.   :24.00   Max.   :19.00   Max.   :42.00                     
## 
EB.fem.df <- EB.fem.df %>% 
  mutate(EOE.level = case_when(
    EOE <= 9 ~ "Low",
    EOE > 9 ~ "High"))
    
EB.fem.df %>%
  group_by(EOE.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   EOE.level [2]
##   EOE.level     n
##   <chr>     <int>
## 1 High         42
## 2 Low          30
EB.fem.df %>% ggplot(aes(sweet.liking, sugar.intake, color = EOE.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'

TFEQ emotional analysis

## TFEQ Emotional 
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo         EOE.level        
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00   Length:100        
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75   Class :character  
##  Median :16.00   Median :11.00   Median :21.50   Mode  :character  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22                     
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00                     
##  Max.   :24.00   Max.   :19.00   Max.   :42.00                     
## 
EB.df <- EB.df %>% 
  mutate(emo.level = case_when(
    emotional <= 12 ~ "Low",
    emotional > 12 ~ "High"))
    
EB.df %>%
  group_by(emo.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   emo.level [2]
##   emo.level     n
##   <chr>     <int>
## 1 High         47
## 2 Low          53
EB.df %>% ggplot(aes(sweet.liking, sugar.intake, color = emo.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'

## TFEQ Emotional: females only
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo         EOE.level        
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00   Length:100        
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75   Class :character  
##  Median :16.00   Median :11.00   Median :21.50   Mode  :character  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22                     
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00                     
##  Max.   :24.00   Max.   :19.00   Max.   :42.00                     
##                                                                    
##   emo.level        
##  Length:100        
##  Class :character  
##  Mode  :character  
##                    
##                    
##                    
## 
EB.fem.df <- EB.fem.df %>% 
  mutate(emo.level = case_when(
    emotional <= 12 ~ "Low",
    emotional > 12 ~ "High"))
    
EB.fem.df %>%
  group_by(emo.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   emo.level [2]
##   emo.level     n
##   <chr>     <int>
## 1 High         40
## 2 Low          32
EB.fem.df %>% ggplot(aes(sweet.liking, sugar.intake, color = emo.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'

Uncontrolled eating analysis

## Emotional overeating
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo         EOE.level        
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00   Length:100        
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75   Class :character  
##  Median :16.00   Median :11.00   Median :21.50   Mode  :character  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22                     
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00                     
##  Max.   :24.00   Max.   :19.00   Max.   :42.00                     
##                                                                    
##   emo.level        
##  Length:100        
##  Class :character  
##  Mode  :character  
##                    
##                    
##                    
## 
EB.df <- EB.df %>% 
  mutate(uncontrolled.level = case_when(
    uncontrolled < 18 ~ "Low",
    uncontrolled >= 18 ~ "High"))
    
EB.df %>%
  group_by(uncontrolled.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   uncontrolled.level [2]
##   uncontrolled.level     n
##   <chr>              <int>
## 1 High                  58
## 2 Low                   42
EB.df %>% ggplot(aes(sweet.liking, sugar.intake, color = uncontrolled.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'

Restraint analysis

## Emotional overeating
EB.df %>%
  summary()
##       ID                 age            height          weight     
##  Length:100         Min.   :18.00   Min.   :53.00   Min.   : 71.0  
##  Class :character   1st Qu.:21.00   1st Qu.:63.00   1st Qu.:126.8  
##  Mode  :character   Median :24.00   Median :65.00   Median :143.0  
##                     Mean   :28.04   Mean   :65.32   Mean   :152.7  
##                     3rd Qu.:30.00   3rd Qu.:68.00   3rd Qu.:175.0  
##                     Max.   :68.00   Max.   :76.00   Max.   :320.0  
##                                                                    
##       sex         sex.other        race         race.other    ethnicity   
##  Min.   :1.00   Min.   : NA   Min.   :1.000   Min.   : NA   Min.   :1.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:3.000   1st Qu.: NA   1st Qu.:2.00  
##  Median :2.00   Median : NA   Median :4.000   Median : NA   Median :2.00  
##  Mean   :1.72   Mean   :NaN   Mean   :4.232   Mean   :NaN   Mean   :1.81  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:5.000   3rd Qu.: NA   3rd Qu.:2.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.000   Max.   : NA   Max.   :2.00  
##                 NA's   :100   NA's   :1       NA's   :100                 
##     us.born       birthplace     agetous        timeinus      education    
##  Min.   :1.00   Min.   : NA   Min.   :1.00   Min.   :1.00   Min.   : 5.00  
##  1st Qu.:1.00   1st Qu.: NA   1st Qu.:1.00   1st Qu.:1.00   1st Qu.: 6.00  
##  Median :1.00   Median : NA   Median :1.00   Median :1.00   Median : 9.00  
##  Mean   :1.35   Mean   :NaN   Mean   :2.46   Mean   :2.33   Mean   : 8.15  
##  3rd Qu.:2.00   3rd Qu.: NA   3rd Qu.:4.25   3rd Qu.:3.25   3rd Qu.: 9.00  
##  Max.   :2.00   Max.   : NA   Max.   :7.00   Max.   :8.00   Max.   :12.00  
##                 NA's   :100                                                
##  income.personal income.household    exercise       ssb.day     sugars.amount 
##  Min.   :1.00    Min.   :1.00     Min.   :1.00   Min.   :1.00   Min.   :1.00  
##  1st Qu.:2.00    1st Qu.:4.00     1st Qu.:1.00   1st Qu.:1.00   1st Qu.:2.00  
##  Median :3.00    Median :5.50     Median :3.00   Median :1.00   Median :2.00  
##  Mean   :3.63    Mean   :5.36     Mean   :3.41   Mean   :1.75   Mean   :1.94  
##  3rd Qu.:5.00    3rd Qu.:7.00     3rd Qu.:5.00   3rd Qu.:2.00   3rd Qu.:2.00  
##  Max.   :8.00    Max.   :8.00     Max.   :8.00   Max.   :7.00   Max.   :3.00  
##                                                                               
##       BMI         sweet.liking     sugar.intake       sugarHEI     fatHEI     
##  Min.   :11.81   Min.   :-62.11   Min.   : 130.0   Min.   :0   Min.   :1.820  
##  1st Qu.:21.08   1st Qu.: 21.12   1st Qu.: 260.0   1st Qu.:0   1st Qu.:3.200  
##  Median :24.44   Median : 37.50   Median : 260.0   Median :5   Median :4.640  
##  Mean   :25.20   Mean   : 32.77   Mean   : 386.1   Mean   :3   Mean   :4.008  
##  3rd Qu.:27.18   3rd Qu.: 51.61   3rd Qu.: 442.0   3rd Qu.:5   3rd Qu.:4.640  
##  Max.   :55.78   Max.   : 85.00   Max.   :1196.0   Max.   :5   Max.   :6.560  
##                                                                               
##     SuFatHEI           sHEI            BAS         uncontrolled  
##  Min.   : 1.820   Min.   :21.45   Min.   :10.00   Min.   : 9.00  
##  1st Qu.: 4.280   1st Qu.:41.36   1st Qu.:31.00   1st Qu.:16.00  
##  Median : 8.200   Median :46.97   Median :37.00   Median :18.00  
##  Mean   : 7.008   Mean   :46.24   Mean   :36.49   Mean   :18.65  
##  3rd Qu.: 9.640   3rd Qu.:51.99   3rd Qu.:43.00   3rd Qu.:22.00  
##  Max.   :11.560   Max.   :67.06   Max.   :50.00   Max.   :34.00  
##                                                                  
##    restraint       emotional           EF             EOE       
##  Min.   : 6.00   Min.   : 6.00   Min.   : 3.00   Min.   : 4.00  
##  1st Qu.:11.00   1st Qu.: 8.75   1st Qu.:12.00   1st Qu.: 6.00  
##  Median :14.00   Median :12.00   Median :13.00   Median : 9.00  
##  Mean   :13.90   Mean   :12.28   Mean   :12.64   Mean   : 9.94  
##  3rd Qu.:16.25   3rd Qu.:16.00   3rd Qu.:15.00   3rd Qu.:13.00  
##  Max.   :24.00   Max.   :24.00   Max.   :15.00   Max.   :19.00  
##                                                                 
##       EUE              FF              FR              SE       
##  Min.   : 4.00   Min.   : 5.00   Min.   : 4.00   Min.   : 4.00  
##  1st Qu.: 9.00   1st Qu.: 6.75   1st Qu.: 9.00   1st Qu.: 8.00  
##  Median :12.00   Median :10.00   Median :10.00   Median :11.00  
##  Mean   :12.22   Mean   : 9.95   Mean   : 9.98   Mean   :11.39  
##  3rd Qu.:15.25   3rd Qu.:12.25   3rd Qu.:11.00   3rd Qu.:15.00  
##  Max.   :20.00   Max.   :21.00   Max.   :15.00   Max.   :20.00  
##                                                                 
##        H               SR             emo         EOE.level        
##  Min.   : 8.00   Min.   : 4.00   Min.   :10.00   Length:100        
##  1st Qu.:13.00   1st Qu.: 8.75   1st Qu.:15.75   Class :character  
##  Median :16.00   Median :11.00   Median :21.50   Mode  :character  
##  Mean   :15.53   Mean   :10.93   Mean   :22.22                     
##  3rd Qu.:18.00   3rd Qu.:13.00   3rd Qu.:29.00                     
##  Max.   :24.00   Max.   :19.00   Max.   :42.00                     
##                                                                    
##   emo.level         uncontrolled.level
##  Length:100         Length:100        
##  Class :character   Class :character  
##  Mode  :character   Mode  :character  
##                                       
##                                       
##                                       
## 
EB.df <- EB.df %>% 
  mutate(restraint.level = case_when(
    restraint < 14 ~ "Low",
    restraint >= 14 ~ "High"))
    
EB.df %>%
  group_by(restraint.level) %>%
  count()
## # A tibble: 2 × 2
## # Groups:   restraint.level [2]
##   restraint.level     n
##   <chr>           <int>
## 1 High               55
## 2 Low                45
EB.df %>% ggplot(aes(sweet.liking, sugar.intake, color = restraint.level)) +
  geom_point() +
  geom_smooth(method = lm, se = FALSE)+
  stat_cor(method = "pearson") +
  theme_light() 
## `geom_smooth()` using formula = 'y ~ x'