Sweet Taste Preference and Eating Behaviors on Diet
Author
May
Published
June 6, 2024
Study objectives
Goal: To understand the influence of sweet taste liking and eating behaviors on dietary pattern
Objective 1: To determine whether sweet taste liking and eating behaviors are associated with snack choice
Objective 2: To determine whether sweet taste liking and eating behaviors are associated with added sugars intake
Objective 3: To determine whether sweet taste liking and eating behaviors are associated with diet quality (i.e., sHEI)
Study design: Participants tasted a series of sucrose solutions to identify their preferred sucrose concentration (pref.mean). Participants also answered a series of surveys to assess their eating behaviors and diet quality (see survey variables below). Participant were asked to choose 1 snack (out of 12) to take home. The snacks can be divided into either 2 categories based on sweetness (not sweet vs sweet, SnackSwtCat), or caloric density (low vs high calories, SnackCalCat)
Survey variable and their abbreviations: BAS = body appreciation score; BAScat = body appreciation score category, by median; CR = cognitive restraint; CRcat = cognitive restraint, by tertiles; EBs = eating behaviors; EM = emotional eating; EMcat = emotional eating category, by tertiles; SFBL = sweet foods and beverages liking; SFBLcat = sweet foods and beverages liking, by tertiles; sHEI = health eating index; UE = uncontrolled eating; UEcat = uncontrolled eating category, by tertiles; UHF = unhealthy fat liking; UHFcat = unhealthy fat liking, by tertiles
I checked for data normality and I tried to transform the variables (e.g., log transform). It improved a little but it was not much. I recall there is a method called box-cox transformation but I have forgotten how to calculate the lambda (?).
Code
## Agehistfunc(full.df, age, "Age histogram")
Code
qqfunc(full.df, age, "Age QQ plot")
Code
shapiro.test(log10(full.df$age)) ## not normal
Shapiro-Wilk normality test
data: log10(full.df$age)
W = 0.81804, p-value = 1.683e-07
This is not significant here, but I hypothesize (based on analyses from other independent data sets), that people who have a stronger sweet preference may exhibit more uncontrolled eating behaviors (binge eating)
Code
## Sweet preference and aget.test(age ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: age by as.factor(PrefCat)
t = -0.9142, df = 54.771, p-value = 0.3646
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-3.926927 1.466700
sample estimates:
mean in group disliker mean in group liker
22.40625 23.63636
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(age), sd=sd(age), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and age", x ="Sweet preference", y ="age") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and BMIt.test(BMI ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: BMI by as.factor(PrefCat)
t = -0.21944, df = 62.388, p-value = 0.827
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-4.590914 3.682584
sample estimates:
mean in group disliker mean in group liker
27.69965 28.15382
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(BMI), sd=sd(BMI), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and BMI", x ="Sweet preference", y ="BMI") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and preferred sucrose concentrationt.test(pref.mean ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: pref.mean by as.factor(PrefCat)
t = -11.874, df = 45.036, p-value = 1.813e-15
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-0.5138395 -0.3648049
sample estimates:
mean in group disliker mean in group liker
0.2024045 0.6417267
Code
## Sweet preference and intensityt.test(intensity ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: intensity by as.factor(PrefCat)
t = 3.4558, df = 58.427, p-value = 0.001029
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
4.955445 18.593797
sample estimates:
mean in group disliker mean in group liker
79.56250 67.78788
Code
## Sweet preference and sugar intaket.test(sugar.intake ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: sugar.intake by as.factor(PrefCat)
t = -2.7471, df = 55.348, p-value = 0.008098
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-308.61967 -48.28942
sample estimates:
mean in group disliker mean in group liker
403.0000 581.4545
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(sugar.intake/4), sd=sd(sugar.intake/4), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +labs(x ="", y ="Added sugars intake, grams") +theme(axis.text.x =element_text(size =15)) +theme(axis.text.y =element_text(size =15), axis.title=element_text(size=15)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and sHEIt.test(sHEI ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: sHEI by as.factor(PrefCat)
t = 1.3766, df = 58.098, p-value = 0.1739
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-1.340624 7.245378
sample estimates:
mean in group disliker mean in group liker
46.10844 43.15606
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(sHEI), sd=sd(sHEI), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and sHEI", x ="Sweet preference", y ="sHEI") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and BASt.test(BAS ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: BAS by as.factor(PrefCat)
t = -0.12767, df = 62.43, p-value = 0.8988
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-4.337159 3.816326
sample estimates:
mean in group disliker mean in group liker
34.40625 34.66667
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(BAS), sd=sd(BAS), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and BAS", x ="Sweet preference", y ="BAS") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and IESt.test(IES ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: IES by as.factor(PrefCat)
t = 0.51995, df = 61.541, p-value = 0.605
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-0.2026562 0.3451134
sample estimates:
mean in group disliker mean in group liker
3.480978 3.409750
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(IES), sd=sd(IES), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and IES", x ="Sweet preference", y ="IES") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and uncontrolled eatingt.test(uncontrolled ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: uncontrolled by as.factor(PrefCat)
t = -1.7291, df = 61.97, p-value = 0.08878
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-4.9063759 0.3552396
sample estimates:
mean in group disliker mean in group liker
18.90625 21.18182
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(uncontrolled), sd=sd(uncontrolled), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and uncontrolled eating", x ="Sweet preference", y ="uncontrolled eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and restrictive eatingt.test(restraint ~as.factor((PrefCat)), full.df)
Welch Two Sample t-test
data: restraint by as.factor((PrefCat))
t = -0.19961, df = 62.671, p-value = 0.8424
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-2.137822 1.749564
sample estimates:
mean in group disliker mean in group liker
13.59375 13.78788
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(restraint), sd=sd(restraint), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and restrictive eating", x ="Sweet preference", y ="restrictive eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Code
## Sweet preference and emotional eatingt.test(emotional ~as.factor(PrefCat), full.df)
Welch Two Sample t-test
data: emotional by as.factor(PrefCat)
t = 0.05463, df = 60.993, p-value = 0.9566
alternative hypothesis: true difference in means between group disliker and group liker is not equal to 0
95 percent confidence interval:
-2.629777 2.777504
sample estimates:
mean in group disliker mean in group liker
12.43750 12.36364
Code
full.df %>%group_by(PrefCat) %>%summarize(mean =mean(emotional), sd=sd(emotional), n =n()) %>%ggplot(aes(x =as.factor(PrefCat), y = mean, fill =as.factor(PrefCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sweet preference and emotional eating", x ="Sweet preference", y ="emotional eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#F44336"))
Differences - by snack choice
Code
## Snack choice and agesummary(aov(age ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 38 12.65 0.414 0.744
Residuals 61 1864 30.56
Code
## Snack choice and hincsummary(aov(hinc ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 4.5 1.500 0.443 0.723
Residuals 61 206.5 3.385
Code
## Snack choice and sweet intensitysummary(aov(intensity ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 901 300.4 1.373 0.26
Residuals 61 13348 218.8
Code
## Snack choice and sweet preferencesummary(aov(pref.mean ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 0.247 0.08239 1.164 0.331
Residuals 61 4.319 0.07080
Code
## Snack choice and BMIsummary(aov(BMI ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 214 71.49 1.041 0.381
Residuals 61 4191 68.71
Code
## Snack choice and sHEIsummary(aov(sHEI ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 460 153.37 2.109 0.108
Residuals 61 4437 72.74
Code
## Snack choice and BASsummary(aov(BAS ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 99 33.10 0.483 0.695
Residuals 61 4177 68.47
Code
## Snack Choice and IESsummary(aov(IES ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 0.251 0.08373 0.267 0.849
Residuals 61 19.151 0.31394
Code
## Snack choice and uncontrolled eatingsummary(aov(uncontrolled ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 16.1 5.375 0.177 0.911
Residuals 61 1849.6 30.322
Code
## Snack choice and restrictive eatingsummary(aov(restraint ~as.factor((SnackCat)), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor((SnackCat)) 3 47.6 15.87 1.047 0.378
Residuals 61 924.2 15.15
Code
## Snack choice and emotional eatingsummary(aov(emotional ~as.factor(SnackCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SnackCat) 3 33.7 11.24 0.371 0.774
Residuals 61 1849.9 30.33
Differences - by sugar intake
Code
## Sugar intake and agesummary(aov(age ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 21 10.52 0.347 0.708
Residuals 62 1881 30.34
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(age), sd=sd(age), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and age", x ="Sugar intake", y ="age") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and BMIsummary(aov(BMI ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 131 65.49 0.95 0.392
Residuals 62 4275 68.94
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(BMI), sd=sd(BMI), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and BMI", x ="Sugar intake", y ="BMI") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and sweet preferencesummary(aov(pref.mean ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 0.839 0.4196 6.981 0.00184 **
Residuals 62 3.726 0.0601
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(pref.mean), sd=sd(pref.mean), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and sweet preference", x ="Sugar intake", y ="Sweet preference") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and sHEIsummary(aov(sHEI ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 40 19.87 0.254 0.777
Residuals 62 4857 78.34
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(sHEI), sd=sd(sHEI), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and diet quality", x ="Sugar intake", y ="Diet quality") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and BASsummary(aov(BAS ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 475 237.6 3.876 0.0259 *
Residuals 62 3801 61.3
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(BAS), sd=sd(BAS), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and body appreciation", x ="Sugar intake", y ="Body appreciation") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and IESsummary(aov(IES ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 0.132 0.06608 0.213 0.809
Residuals 62 19.270 0.31080
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(IES), sd=sd(IES), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and intuitive eating", x ="Sugar intake", y ="Intuitive eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and uncontrolled eatingsummary(aov(uncontrolled ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 36.9 18.44 0.625 0.539
Residuals 62 1828.9 29.50
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(uncontrolled), sd=sd(uncontrolled), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and uncontrolled eating", x ="Sugar intake", y ="Uncontrolled eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and restrictive eatingsummary(aov(restraint ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 0.4 0.189 0.012 0.988
Residuals 62 971.5 15.669
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(restraint), sd=sd(restraint), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and restrictive eating", x ="Sugar intake", y ="Restrictive eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Code
## Sugar intake and emotional eatingsummary(aov(emotional ~as.factor(SugarCat), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(SugarCat) 2 49.1 24.54 0.829 0.441
Residuals 62 1834.5 29.59
Code
full.df %>%group_by(SugarCat) %>%summarize(mean =mean(emotional), sd=sd(emotional), n =n()) %>%ggplot(aes(x =as.factor(SugarCat), y = mean, fill =as.factor(SugarCat))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Sugar intake and emotional eating", x ="Sugar intake", y ="Emotional eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#66BB6A", "#FFCA28", "#F44336"))
Differences - by diet quality
Code
## Diet quality and agesummary(aov(age ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 10.4 10.38 0.346 0.559
Residuals 63 1891.6 30.02
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(age), sd=sd(age), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and age", x ="Diet quality", y ="age") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and BMIsummary(aov(BMI ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 66 66.25 0.962 0.33
Residuals 63 4339 68.88
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(BMI), sd=sd(BMI), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and BMI", x ="Diet quality", y ="BMI") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and sweet preferencesummary(aov(pref.mean ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 0.027 0.02706 0.376 0.542
Residuals 63 4.539 0.07204
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(pref.mean), sd=sd(pref.mean), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and sweet preference", x ="Diet quality", y ="Sweet preference") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and sHEIsummary(aov(sHEI ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 3282 3282 128 <2e-16 ***
Residuals 63 1615 26
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(sHEI), sd=sd(sHEI), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and diet quality", x ="Diet quality", y ="Diet quality") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and BASsummary(aov(BAS ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 118 117.9 1.787 0.186
Residuals 63 4158 66.0
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(BAS), sd=sd(BAS), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and body appreciation", x ="Diet quality", y ="Body appreciation") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and IESsummary(aov(IES ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 0.165 0.1646 0.539 0.466
Residuals 63 19.237 0.3054
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(IES), sd=sd(IES), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and intuitive eating", x ="Diet quality", y ="Intuitive eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and uncontrolled eatingsummary(aov(uncontrolled ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 6.1 6.117 0.207 0.65
Residuals 63 1859.6 29.518
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(uncontrolled), sd=sd(uncontrolled), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and uncontrolled eating", x ="Diet quality", y ="Uncontrolled eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and restrictive eatingsummary(aov(restraint ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 5.2 5.158 0.336 0.564
Residuals 63 966.7 15.344
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(restraint), sd=sd(restraint), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and restrictive eating", x ="Diet quality", y ="Restrictive eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Code
## Diet quality and emotional eatingsummary(aov(emotional ~as.factor(DQ), full.df))
Df Sum Sq Mean Sq F value Pr(>F)
as.factor(DQ) 1 0.9 0.889 0.03 0.864
Residuals 63 1882.7 29.884
Code
full.df %>%group_by(DQ) %>%summarize(mean =mean(emotional), sd=sd(emotional), n =n()) %>%ggplot(aes(x =as.factor(DQ), y = mean, fill =as.factor(DQ))) +geom_bar(stat ="identity", position =position_dodge()) +labs(title ="Diet quality and emotional eating", x ="Diet quality", y ="Emotional eating") +geom_errorbar(aes(ymin = mean - sd/sqrt(n), ymax = mean + sd/sqrt(n), width =0.25)) +theme_bw() +scale_fill_manual(values =c("#F44336", "#66BB6A"))
Logistic regression - snack choice
Code
## The effect of sweet preference on snack choice## Sweet snacktidy(glm(as.factor(SnackSwtCat) ~log10(pref.mean), family = binomial, full.df), exponentiate =TRUE, conf.int =TRUE)
## The effect of BMI on snack choice## Sweet snacktidy(glm(as.factor(SnackSwtCat) ~ BMI, family = binomial, full.df), exponentiate =TRUE, conf.int =TRUE)
## Sugar log Mod 4 - with interactions sugar.logmod.4<-multinom(SugarCat ~ pref.mean*intensity + BMI, full.df)
# weights: 18 (10 variable)
initial value 71.409799
iter 10 value 61.527396
iter 20 value 61.321607
iter 30 value 61.297906
iter 40 value 61.296459
final value 61.296349
converged
! `broom::tidy()` failed to tidy the model.
✔ `tidy_parameters()` used instead.
ℹ Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
Linear regression - sugar intake
Regression models were built using variables that are significantly correlated with added sugars intake (i.e., BMI, BAS, sweet intensity perception, and sweet preference)
BMI is correlated with BAS
Sweet intensity perception is correlated with sweet preference
Code
## The effect of sweet preference on sugar intakefull.df %>%ggplot(aes(log10(pref.mean), sugar.intake)) +geom_point() +geom_smooth(method = lm) +stat_cor() +theme_bw()
Code
tidy(glm(sugar.intake ~log10(pref.mean), family = gaussian, full.df), exponentiate =TRUE, conf.int =TRUE)
## Sugar lin Mod 1 sugar.linmod.1<-glm(sugar.intake ~log10(pref.mean) , family = gaussian, full.df)summary(sugar.linmod.1)
Call:
glm(formula = sugar.intake ~ log10(pref.mean), family = gaussian,
data = full.df)
Deviance Residuals:
Min 1Q Median 3Q Max
-371.81 -178.10 -53.26 102.74 673.35
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 692.22 55.50 12.473 < 2e-16 ***
log10(pref.mean) 423.30 98.92 4.279 6.5e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 60149.45)
Null deviance: 4890850 on 64 degrees of freedom
Residual deviance: 3789415 on 63 degrees of freedom
AIC: 903.73
Number of Fisher Scoring iterations: 2
Code
## Sugar lin Mod 2 sugar.linmod.2<-glm(sugar.intake ~log10(pref.mean) + intensity , family = gaussian, full.df)summary(sugar.linmod.2)
Call:
glm(formula = sugar.intake ~ log10(pref.mean) + intensity, family = gaussian,
data = full.df)
Deviance Residuals:
Min 1Q Median 3Q Max
-395.42 -147.77 -42.47 102.28 688.80
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 901.924 153.923 5.860 1.92e-07 ***
log10(pref.mean) 357.667 107.879 3.315 0.00153 **
intensity -3.268 2.241 -1.459 0.14969
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 59091.6)
Null deviance: 4890850 on 64 degrees of freedom
Residual deviance: 3663679 on 62 degrees of freedom
AIC: 903.54
Number of Fisher Scoring iterations: 2
Code
## Sugar lin Mod 3sugar.linmod.3<-glm(sugar.intake ~log10(pref.mean) + intensity + BAS, family = gaussian, full.df)summary(sugar.linmod.3)
Call:
glm(formula = sugar.intake ~ log10(pref.mean) + intensity + BAS,
family = gaussian, data = full.df)
Deviance Residuals:
Min 1Q Median 3Q Max
-371.4 -169.6 -26.1 148.8 627.8
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1271.988 163.148 7.797 9.85e-11 ***
log10(pref.mean) 359.385 95.944 3.746 0.000401 ***
intensity -1.677 2.029 -0.826 0.411807
BAS -14.082 3.377 -4.170 9.80e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 46739.57)
Null deviance: 4890850 on 64 degrees of freedom
Residual deviance: 2851114 on 61 degrees of freedom
AIC: 889.24
Number of Fisher Scoring iterations: 2
Code
## Sugar lin Mod 4 - with interactions sugar.linmod.4<-glm(sugar.intake ~log10(pref.mean)*intensity + BAS, family = gaussian, full.df)summary(sugar.linmod.4)
Call:
glm(formula = sugar.intake ~ log10(pref.mean) * intensity + BAS,
family = gaussian, data = full.df)
Deviance Residuals:
Min 1Q Median 3Q Max
-368.46 -162.05 -26.14 138.51 637.36
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1338.497 232.349 5.761 3.07e-07 ***
log10(pref.mean) 557.639 499.232 1.117 0.268451
intensity -2.582 3.028 -0.852 0.397363
BAS -14.065 3.401 -4.136 0.000112 ***
log10(pref.mean):intensity -2.540 6.274 -0.405 0.687088
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 47389.16)
Null deviance: 4890850 on 64 degrees of freedom
Residual deviance: 2843350 on 60 degrees of freedom
AIC: 891.06
Number of Fisher Scoring iterations: 2
Code
## Compare modelsanova(sugar.linmod.2, sugar.linmod.1, test ="Chisq")
Analysis of Deviance Table
Model 1: sugar.intake ~ log10(pref.mean) + intensity
Model 2: sugar.intake ~ log10(pref.mean)
Resid. Df Resid. Dev Df Deviance Pr(>Chi)
1 62 3663679
2 63 3789415 -1 -125736 0.1446
Code
anova(sugar.linmod.2, sugar.linmod.3, test ="Chisq")
! `broom::tidy()` failed to tidy the model.
✔ `tidy_parameters()` used instead.
ℹ Add `tidy_fun = broom.helpers::tidy_parameters` to quiet these messages.
Linear regression - sHEI
Code
## The effect of sweet preference on sHEIsummary(glm(sHEI ~log10(pref.mean), family = gaussian, full.df))
Call:
glm(formula = sHEI ~ log10(pref.mean), family = gaussian, data = full.df)
Deviance Residuals:
Min 1Q Median 3Q Max
-19.5521 -6.0489 -0.8705 6.8385 16.4449
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 41.847 1.951 21.448 <2e-16 ***
log10(pref.mean) -5.888 3.478 -1.693 0.0954 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 74.34753)
Null deviance: 4897.0 on 64 degrees of freedom
Residual deviance: 4683.9 on 63 degrees of freedom
AIC: 468.5
Number of Fisher Scoring iterations: 2