Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need to code for this practice assignment all the code needs to be assigned as per the directions. its going in code grade so Q
Need to code for this practice assignment all the code needs to be assigned as per the directions. its going in code grade so Q needs to be assigned to Q the Q assigned to Q and so on thank you. fastfoodStats For this assignment, name your R file fastfoodStats.R For all questions you should load tidyverse, lmbeta and openintro. You should not need to use any other libraries. If the openintro package is not installed, youll need to do a onetime installation from the Console Window in RStudio like this: install.packagesopenintro If the lmbeta package is not installed, youll need to do a onetime installation from the Console Window in RStudio like this: install.packageslmbeta" Load libraries with suppressPackageStartupMessageslibrarytidyverse suppressPackageStartupMessageslibrarylmbeta suppressPackageStartupMessageslibraryopenintro Round all floatdbl values to two decimal places. All statistics should be run with variables in the order I state EgRun a regression predicting mileage from mpg make, and type would be: lmmileage ~ mpg make type... Before attempting to answer these, or if you lose points upon an attempt, please review all CodeGrade information provided in the CodeGrade overview submodule if you do not you are likely to lose points. To access the fastfood data, run the following: fastfood openintro::fastfood 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 Create a regression predicting whether or not a restaurant is McDonalds or Subway based on calories, sodium, and protein. McDonalds should be Subway Save the coefficients to Q Run the same regression as in # but remove sodium as a predictor. Which model fits better? Save the AIC of the better model to 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 QYou can access the coefficients by indexing the model object 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
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