Question: For this question, use data from only restaurants with between 5 0 and 6 0 items in the data set. Predict total fat from cholesterol,

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]filtered_data <- fastfood |>
filter(between(item,50,60))
THIS IS MY CODE SO FAR: model <- lm(total_fat ~ cholesterol + total_carb + vit_a + restaurant, data = filtered_data)
std_coeffs <- lm.beta(model)
significant_predictors <- names(std_coeffs[which(abs(std_coeffs)>0.05)])
model <- lm(total_fat ~ ., data = filtered_data[, c(significant_predictors, "total_fat")])
Q5<- strongest_coeff <- round(max(std_coeffs),2)
Q5<- cat("Strongest Standardized Coefficient:", strongest_coeff, "
")
THIS IS THE ERROR I KEEP RECEIVING, ANY IDEA HOW TO FIX IT? Q5Error in `filter()`:
In argument: `between(item,50,60)`.
Caused by error in `between()`:
! Can't combine `x` and `left`.
Backtrace:
1. dplyr::filter(fastfood, between(item,50,60))
8. dplyr::between(item,50,60)
Error in filter(fastfood, between(item,50,60)) :
Caused by error in `between()`:
! Can't combine `x` and `left`.

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!