origNames = names(d)
names(d)[2] = “specNeeds”
names(d)[3] = “nutShop”
names(d)[4] = “nutRest”
names(d)[5] = “avgCal”
names(d)[6] = “selfCal”
names(d)[7] = “Taste”
names(d)[8] = “Conv”
names(d)[9] = “Content”
names(d)[10] = “Protein”
names(d)[11] = “Carb”
names(d)[12] = “Fat”
names(d)[13] = “Vit”
names(d)[14] = “Useful”
likertLevels = c(“Never” = “Never”, “Sometimes” = “Sometimes”, “About half the time” = “half”, “Often” = “Often”, “Always” = “Always”)
d$Taste = revalue(d$Taste, likertLevels)
d$Taste = factor(d$Taste, ordered = TRUE, levels = likertLevels)
d$Conv = revalue(d$Conv, likertLevels)
d$Conv = factor(d$Conv, ordered = TRUE, levels = likertLevels)
d$Content = revalue(d$Content, likertLevels)
d$Content = factor(d$Content, ordered = TRUE, levels = likertLevels)
d$Protein = revalue(d$Protein, likertLevels)
d$Protein = factor(d$Protein, ordered = TRUE, levels = likertLevels)
d$Fat = revalue(d$Fat, likertLevels)
d$Fat = factor(d$Fat, ordered = TRUE, levels = likertLevels)
d$Vit = revalue(d$Vit, likertLevels)
d$Vit = factor(d$Vit, ordered = TRUE, levels = likertLevels)
d$Carb = revalue(d$Carb, likertLevels)
d$Carb = factor(d$Carb, ordered = TRUE, levels = likertLevels)
specnames = c(“None” = “No”, “No fish or seafood” = “Yes”, “Gluten-free” = “Yes”, “Food Allergies” = “Yes”, “pescetarian” = “Yes”, “Vegitarian” = “Yes”, “Don't eat red meat” = “Yes”, “Lactose-intolerant” = “Yes”)
d$specNeeds = revalue(d$specNeeds, specnames)
d$specNeeds = factor(d$specNeeds, ordered = TRUE, levels = likertLevels)
The survey was motivated by the want to understand what variables contribute to whether people used nutritional labels when shopping or dining. This survey tried to understand why people choose the foods they do, whether it was entirely based on taste/other factors (see variables below) or does nutrition play a bigger role in food choices.
Our tested hypothesis were:
1. If people do not base their food choices off of carb content, then they will also neglect fat content in their food choices.
2. If people have special needs, then they check nutrition labels more often.
3. If people find nutrition labels useful when eating, then they will base their decisions off of taste less often.
We created a survey consisting of 13 questions discussing people’s habits regarding food, knowledge of nutrition, and the use of nutrition labels. We created this survey and placed a link on Facebook. Ben, Hunter, and Thomas asked multiple Macalester student friends on facebook to take the survey. Ben also sent out an email to the members of the football team regarding the survey. Our targeted research group was 18-22 year old Macalester students. We did reach some non targeted individuals. Our final response count was exactly 100. We converted our data to a csv file which was then read into RStudio. We then built our models off of this data.
The important variables in our model contain bar charts representing their distribution.
specNeeds: Tells if the case has any special nutrition needs
i.e. vegetarian, vegan, food allergies, other
barchart(tally(~specNeeds, data = d, margins = FALSE, family = "binomial"),
auto.key = TRUE)
nutShop: Does the case use nutrition labels when shopping
i.e. yes or no
nutRest: Does the case use nutrition labels when at a restaurant
i.e. yes or no
avgCal: The amount of calories the case believes the average person eats in a day
i.e. 1500-2000, 2000-2500, 2500-3000, 3000+
selfCal: The amount of calories the case believes he/she eats in a day
i.e. 1500-2000, 2000-2500, 2500-3000, 3000+
Taste: How often the variable of taste affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
barchart(tally(~Taste, data = d, margins = FALSE, format = "count"), auto.key = TRUE)
Conv: How often the variable of convenience affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
Content: How often the amount of calories affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
Protein: How often the variable of protein affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
Carb: How often the amount of carbs in a food affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
barchart(tally(~Carb, data = d, margins = FALSE, format = "count"), auto.key = TRUE)
Fat: How often the amount of fat affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
barchart(tally(~Fat, data = d, margins = FALSE, format = "count"), auto.key = TRUE)
Vit: How often the amount of vitamins affects the case’s food decision
i.e. Never, Sometimes, About half the time, Often, Always
Useful: How useful the case believes a nutrition label would be while eating out.
i.e. scale of one to five.
If people do not base their food choices off of carb content, then they will also neglect fat content in their food choices.
Null Hypothesis : Basing food choices off of carb content will have no effect of choosing food based off of fat content.
modfat = glm(Fat ~ Carb, data = d, family = "binomial")
coef(summary(modfat))
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3365 0.4140 -0.81266 0.416414
## CarbAlways 17.9025 1769.2577 0.01012 0.991927
## CarbNever 2.5337 0.8526 2.97161 0.002962
## CarbOften 2.9755 1.1148 2.66903 0.007607
## CarbSometimes 3.1697 0.8372 3.78623 0.000153
## Size of sample needed to get a reliable p-value.
d2 = resample(d, size = 300)
modfat2 = glm(Fat ~ Carb, data = d2, family = "binomial")
coef(summary(modfat2))
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -0.3629 0.2302 -1.57652 1.149e-01
## CarbAlways 17.9290 1097.2470 0.01634 9.870e-01
## CarbNever 2.6453 0.5229 5.05913 4.212e-07
## CarbOften 3.5818 0.7570 4.73179 2.225e-06
## CarbSometimes 2.4868 0.3934 6.32121 2.595e-10
If people have special needs, then they check nutrition labels more often.
Null Hypothesis : Having special food needs will not affect how often nutrition labels are checked.
modspec = glm(specNeeds ~ nutShop, data = d, family = "binomial")
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
coef(summary(modspec))
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -17.01 6684 -0.002544 0.9980
## nutShop 19.31 6684 0.002889 0.9977
If people find nutrition labels useful when eating, then they will base their decisions off of taste less often.
Null Hypothesis : Finding nutrition labels useful when eating will have no effect on basing food decisions off of taste.
modtaste = lm(Useful ~ Taste, data = d)
anova(modtaste)
## Analysis of Variance Table
##
## Response: Useful
## Df Sum Sq Mean Sq F value Pr(>F)
## Taste 4 17.9 4.46 2.82 0.029 *
## Residuals 95 150.4 1.58
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
coef(summary(modtaste))
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.500 0.5137 8.7608 7.338e-14
## TasteAlways -1.565 0.5612 -2.7880 6.406e-03
## TasteNever 0.500 1.3590 0.3679 7.138e-01
## TasteOften -1.207 0.5396 -2.2368 2.764e-02
## TasteSometimes -2.000 0.8122 -2.4626 1.560e-02
Our first Null Hypothesis that basing food choices off of carb content will have no effect of choosing food based off of fat content has been rejected as our p values for CarbNever, CarbOften, and CarbSometimes were < 0.05. We found that the cases that based food decisions off of carbohydrates did infact also not base them off of fat content.
Our second Null Hypothesis that having special food needs will not affect how often nutrition labels are checked is correct. As our p value was 0.99, we fail to reject this Null.
Our third Null Hypothesis that finding nutrition labels useful when eating will have no effect on basing food decisions off of taste is rejected as our p values for all but TasteNever are less than 0.05.
Two groups of people were targeted. One email was sent to the football team. There was also a facebook invite sent to friends of Thomas, Ben, and Hunter. The group recognizes that a large part of the cases were athletes and this sample group would likely have different food preferences than other possible populations.