Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the response and #######

# Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the

# Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the response and ####### the weather situation variable as predictor. ####### Name your fitted model simplefit. # CG Q2b # Use the summary() function on simplefit ###### to access the results of the regression. # CG Q2c # Print the coefficient for the wet weather situation. ####### Use coef(simplefit) followed by the name of that ####### coefficient in quotes inside square brackets. ####### For example, coef(simplefit) ["weathersitcloudy"] prints ####### the coefficient for the cloudy weather situation. # CG Q2d # Using the regression output, determine how the ride count ####### for wet days compares to the ride count on clear days. ####### If it's higher on wet days, type paste("higher") ####### If it's lower on wet days, type paste("lower") # CG Q2e # Find the R-squared for the regression. ####### In your calculation, use simplefit$deviance and ####### simplefit$null.deviance and not the numbers printed ####### in the summary output for these. # Question 3 - Linear model with multiple predictors. # CG Q3a # Run a linear regression using ride counts as the response ###### modeled by the weather variables weathersit, temp, hum, and windspeed. ###### Use an additive model (don't model interactions or anything fancy). ###### Name your fitted model ridefit. # CG Q3b # Use summary() on your fitted model to print the results. # CG Q3c # How does expected ride count change with an increase in temperature? ####### Print the coefficient for temp in the ridefit model ####### using the same strategy used in Q2c. # CG Q3d # Based on the temp coefficient, do we expect ride count to increase ####### or decrease by 156 rides with an increase in temperature? ####### If ride count is expected to increase with temperature, ####### type paste("increase"). Otherwise paste("decrease"). # CG Q3e # Find the R-squared for the ridefit regression. ####### In your calculation, use ridefit$deviance and ####### ridefit$null.deviance and not the numbers printed ####### in the summary output for these. # Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the response and ####### the weather situation variable as predictor. ####### Name your fitted model simplefit. # CG Q2b # Use the summary() function on simplefit ###### to access the results of the regression. # CG Q2c # Print the coefficient for the wet weather situation. ####### Use coef(simplefit) followed by the name of that ####### coefficient in quotes inside square brackets. ####### For example, coef(simplefit) ["weathersitcloudy"] prints ####### the coefficient for the cloudy weather situation. # CG Q2d # Using the regression output, determine how the ride count ####### for wet days compares to the ride count on clear days. ####### If it's higher on wet days, type paste("higher") ####### If it's lower on wet days, type paste("lower") # CG Q2e # Find the R-squared for the regression. ####### In your calculation, use simplefit$deviance and ####### simplefit$null.deviance and not the numbers printed ####### in the summary output for these. # Question 3 - Linear model with multiple predictors. # CG Q3a # Run a linear regression using ride counts as the response ###### modeled by the weather variables weathersit, temp, hum, and windspeed. ###### Use an additive model (don't model interactions or anything fancy). ###### Name your fitted model ridefit. # CG Q3b # Use summary() on your fitted model to print the results. # CG Q3c # How does expected ride count change with an increase in temperature? ####### Print the coefficient for temp in the ridefit model ####### using the same strategy used in Q2c. # CG Q3d # Based on the temp coefficient, do we expect ride count to increase ####### or decrease by 156 rides with an increase in temperature? ####### If ride count is expected to increase with temperature, ####### type paste("increase"). Otherwise paste("decrease"). # CG Q3e # Find the R-squared for the ridefit regression. ####### In your calculation, use ridefit$deviance and ####### ridefit$null.deviance and not the numbers printed ####### in the summary output for these. # Question 2 Simple linear model. # CG Q2a # Build a linear regression model that has ####### count as the response and ####### the weather situation variable as predictor. ####### Name your fitted model simplefit. # CG Q2b # Use the summary() function on simplefit ###### to access the results of the regression. # CG Q2c # Print the coefficient for the wet weather situation. ####### Use coef(simplefit) followed by the name of that ####### coefficient in quotes inside square brackets. ####### For example, coef(simplefit) ["weathersitcloudy"] prints ####### the coefficient for the cloudy weather situation. # CG Q2d # Using the regression output, determine how the ride count ####### for wet days compares to the ride count on clear days. ####### If it's higher on wet days, type paste("higher") ####### If it's lower on wet days, type paste("lower") # CG Q2e # Find the R-squared for the regression. ####### In your calculation, use simplefit$deviance and ####### simplefit$null.deviance and not the numbers printed ####### in the summary output for these. # Question 3 - Linear model with multiple predictors. # CG Q3a # Run a linear regression using ride counts as the response ###### modeled by the weather variables weathersit, temp, hum, and windspeed. ###### Use an additive model (don't model interactions or anything fancy). ###### Name your fitted model ridefit. # CG Q3b # Use summary() on your fitted model to print the results. # CG Q3c # How does expected ride count change with an increase in temperature? ####### Print the coefficient for temp in the ridefit model ####### using the same strategy used in Q2c. # CG Q3d # Based on the temp coefficient, do we expect ride count to increase ####### or decrease by 156 rides with an increase in temperature? ####### If ride count is expected to increase with temperature, ####### type paste("increase"). Otherwise paste("decrease"). # CG Q3e # Find the R-squared for the ridefit regression. ####### In your calculation, use ridefit$deviance and ####### ridefit$null.deviance and not the numbers printed ####### in the summary output for these.

Step by Step Solution

3.30 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

Question 2 Simple linear model CG Q2a Build a linear regression model Python Code import pandas as pd from sklearnlinearmodel import LinearRegression Load the data data pdreadcsvridedatacsv Split the ... 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

Step: 3

blur-text-image

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

Applied Regression Analysis And Other Multivariable Methods

Authors: David G. Kleinbaum, Lawrence L. Kupper, Azhar Nizam, Eli S. Rosenberg

5th Edition

1285051084, 978-1285963754, 128596375X, 978-1285051086

More Books

Students also viewed these Programming questions