Question: ### Q 1 Create a correlation matrix for the relations between calories, total _ fat, sugar, and calcium for all items at Sonic, Subway, and

### Q1 Create a correlation matrix for the relations between calories, total_fat, sugar, and calcium for all items at Sonic, Subway, and Taco Bell, omitting missing values with `na.omit()`.
- Assign the matrix to Q1. It should look something like this:
```
calories total_fat sugar calcium
calories [value][value][value][value]
total_fat [value][value][value][value]
sugar [value][value][value][value]
calcium [value][value][value][value]
### Q2 Create a regression predicting whether or not a restaurant is McDonalds or Subway based on calories, sodium, and protein. (McDonalds should be 1, Subway 0) Hint: make sure you know how McDonalds is spelled in the dataset.
- Assign the model coefficients to Q2. Your output should look something like this:
```
(Intercept) calories sodium protein
[value][value][value][value]
### Q3 Run the same regression as in Q2 but remove sodium as a predictor. Which is the better model?
- Use the classical AIC (k=2).
Assign the AIC of the better model to Q3.
### Q4 Run a regression predicting calories from saturated fat, fiber, and sugar. Based on *standardized* regression coefficients, identify the strongest predictor.
- Assign the ***un**standardized* regression coefficient of the strongest predictor to Q4.
-(You can access the coefficients by indexing the model object.)
### Q5 For this question, use data from only restaurants with between 50 and 60 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 Q5. Your output should look something like this:
```
[variable name]
[value]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!