Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

bikes

bikes <- read.csv("http://www.andrew.cmu.edu/user/achoulde/94842/data/bikes.csv", header = TRUE) # Transform temp and atemp to degrees C instead of [0,1] scale # Transform humidity to % # Transform wind speed (multiply by 67, the normalizing value) bikes <- transform(bikes, temp = 47 * temp - 8, atemp = 66 * atemp - 16, hum = 100 * hum, windspeed = 67 * windspeed) 

Problem 2: Interpreting and testing linear models

This problem once again uses thebikesdata.

(a)Use thetransformandmapvaluesfunctions to map the values of theseasonandweathersitvariables to something more interpretable. Your newweathersitvariable should have levels: Clear, Cloud, Light.precip, Heavy.precip

# Edit me 

(b)Fit a linear regression model withcntas the outcome, and season, workingday, weathersit, temp, atemp and hum as covariates. Use thesummaryfunction to print a summary of the model showing the model coefficients.

Note that you may wish to code the workingday variable as a factor, though this will not change the estimated coefficient or its interpretation (workingday is already a 0-1 indicator).

# Edit me 

(c)How do you interpret the coefficient ofworkingdayin the model? What is its p-value? Is it statistically significant?

# Edit me 

(d)How do you interpret the coefficient corresponding to Light.precip weather situation? What is its p-value? Is it statistically significant?

# Edit me 

(e)Use thepairsfunction to construct a pairs plot of temp, atemp and hum. The bottom panel of your plot should show correlations (see example in Lecture 9).

# Edit me 

Do you observe any strong colinearities between the variables?

# Edit me 

(f)Use theupdatefunction to update your linear model by removing thetempvariable. Has the coefficient ofatempchanged? Has it changed a lot? Explain.

# Edit me 

(g)How do you interpret the coefficient ofatempin the model from part (f)?

(h)Use theanova()function on your model from part (f) to assess whetherweathersitis a statistically significant factor in the model. Interpret your findings.

# Edit me 

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

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

Finite Mathematics

Authors: Stefan Waner, Jerry Lee Ford Jr, Waner/Costenoble, Steven Costenoble

5th Edition

1111789304, 9781111789305

More Books

Students also viewed these Mathematics questions

Question

bikes

Answered: 1 week ago