Question
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
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]
Q5 <- fastfood |> group_by(restaurant) |> filter(n() >= 50 & n() <= 60) |> select(total_fat, cholesterol, total_carb, vit_a, restaurant) |> drop_na() |> lm(total_fat ~ cholesterol + total_carb + vit_a + restaurant, data = fastfood) |> step(glm, direction = "backward") |> lm.beta() |> max()
When I submit this code, I get the following error:
Error in xj[i] : invalid subscript type 'language'
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The error youre encountering in your code is due to the misuse of the pipe operator and incorrect su...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