Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pizzaStats Assignment Description For this assignment, name your R file pizzaStats.R For all questions you should load tidyverse and lm.beta. You should not need to

pizzaStats Assignment Description

For this assignment, name your R file pizzaStats.R

For all questions you should load tidyverse and lm.beta. You should not need to use any other libraries.

If the tidyverse package is not installed, youll need to do a one-time installation from the Console Window in RStudio like this: install.packages("tidyverse") You cannot attempt to install packages in code that you submit to CodeGrade.

If the lm.beta package is not installed, youll need to do a one-time installation from the Console Window in RStudio like this: install.packages("lm.beta") You cannot attempt to install packages in code that you submit to CodeGrade.

Load tidyverse with: suppressPackageStartupMessages(library(tidyverse))

Load lm.beta with suppressPackageStartupMessages(library(lm.beta))

Download the pizza.csv file from Brightspace and place it in the same folder/directory as your script file. Then in RStudio, set your Working Directory to your Source File location:

Load the pizza.csv file like this: pizza <- read_csv('pizza.csv')

Continue to use %>% for the pipe. CodeGrade does not support the new pipe.

Round all float/dbl values to two decimal places unless otherwise specified.

All statistics should be run with variables in the order I state

E.g., Run a regression predicting mileage from mpg, make, and type would be:

lm(mileage ~ mpg + make + type...)

Before attempting to answer these please review all CodeGrade information provided in the CodeGrade: Intro module. If you do not, you are likely to lose points.

3. Run a regression predicting whether or not wine was ordered from temperature, bill, and pizza.

Assign the coefficients of the summary of the model to Q3. It should look something like this:

Estimate Std. Error z value Pr(>|z|)

(Intercept) [value] [value] [value] [value]

temperature [value] [value] [value] [value]

bill [value] [value] [value] [value]

pizzas [value] [value] [value] [value]

4. Run a regression predicting bill from temperature, pizzas, and got_wine.

Assign the standardized regression coefficients to Q4 by using the lm.beta() function. You should not round these values. The output should look something like this:

Call:

lm(formula = [label] ~ [label] + [label] + [label], data = [label])

Standardized Coefficients::

(Intercept) temperature pizzas got_wine

[value] [value] [value] [value]

Note: CodeGrade will be grading you based on the last line (just the values).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions