Answered step by step
Verified Expert Solution
Question
1 Approved Answer
### Q 1 Create a correlation matrix for the relations between calories, total _ fat, sugar, and calcium for all items at Sonic, Subway, and
### Q Create a correlation matrix for the relations between calories, totalfat, sugar, and calcium for all items at Sonic, Subway, and Taco Bell, omitting missing values with naomit
Assign the matrix to Q It should look something like this:
calories totalfat sugar calcium
calories valuevaluevaluevalue
totalfat valuevaluevaluevalue
sugar valuevaluevaluevalue
calcium valuevaluevaluevalue
### Q Create a regression predicting whether or not a restaurant is McDonalds or Subway based on calories, sodium, and protein. McDonalds should be Subway Hint: make sure you know how McDonalds is spelled in the dataset.
Assign the model coefficients to Q Your output should look something like this:
Intercept calories sodium protein
valuevaluevaluevalue
### Q Run the same regression as in Q but remove sodium as a predictor. Which is the better model?
Use the classical AIC k
Assign the AIC of the better model to Q
### Q Run a regression predicting calories from saturated fat, fiber, and sugar. Based on standardized regression coefficients, identify the strongest predictor.
Assign the unstandardized regression coefficient of the strongest predictor to Q
You can access the coefficients by indexing the model object.
### Q For this question, use data from only restaurants with between and items in the data set. Predict total fat from cholesterol, total carbs, vitamin a and restaurant. Remove any nonsignificant predictors and run again.
Assign the strongest standardized regression coefficient to Q Your output should look something like this:
variable name
value
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started