Step
3:
We decided to create a full model to predict Cases
of Eggs. Even though from earlier we know that there isn't strong correlation
between Cases Sold and any of the other food prices. We decide to include each
of these main effects in our model to see if a linear combination of them has
an effect. Additionally, we aren't sure if the First Week of the month affects
pricing of Eggs, Beef, Pork, Chicken, or Cereal, so we decide to include the
interaction of First.Week with these variables to see if there is an effect.
Since we know that Egg prices are affected by Easter we know we want to include
that interaction into our model, but we don't believe there is an Easter effect
on any of the food prices so we leave those out. We aren't interested in week
number so will leave that out but are also interested in relationship between
Month and Egg Price so will include that interaction and main effect in the
model. Fit a Multiple Linear Regression model to this full model and interpret
the results.
Question
11: Write the fitted regression model calculated above.
Answer: |
Question
12: Provide the hypotheses, test statistic, and the p-value for the F Test.
Based on this test, draw some conclusions about the overall significance of the
model. Assume we are using a significance level of 5%.
Answer: |
Question
13: Go through the output for the T test in R and provide a list of the
variables that are significant. Assume we are using a significance level of 5%.
Answer: |
Question
14: Based on the analysis from step 3, draw some final conclusions on the
variables and interactions (if any) that seem important to the model.
Answer: |
Hints
fit3 <- lm(Cases~Egg.Pr+Beef.Pr+Pork.Pr+Chicken.Pr+Cereal.Pr
+First.Week*Beef.Pr+First.Week*Pork.Pr+First.Week*Chicken.Pr+First.Week*Cereal.Pr
+Pre.easter*Egg.Pr +easter*Egg.Pr + post.easter*Egg.Pr
+monthcoded*Egg.Pr , data=data1)
summary(fit3)
cases = 175735.14 -
577.41*Egg.Pr + 229.63*Beef.Pr + 88.23*Pork.Pr + -166.57*Chicken.Pr -
485.27*Cereal.Pr
+ 25669.82*First.Week*Yes +
949947.8*Pre.easter + 735931.1*easter - 669245.68*post.easter -
8057.24*monthcoded
-
314.64*Beef.Pr*First.WeekYes - 57.09*Pork.Pr*First.WeekYes +
505.87*Chicken.Pr*First.WeekYes + 11.9*Cereal.Pr*First.WeekYes
-
9381.83*Egg.Pr*Pre.easter - 8451.53*Egg.Pr*easter + 6410.26*Egg.Pr*post.easter
+ 79.89*Egg.Pr*monthcoded
Students succeed in their courses by connecting and communicating with an expert until they receive help on their questions
Consult our trusted tutors.