Question: # Question 6 - Let's practice making predictions of the response variable. # CG Q 6 a # We'll make predictions using all 3 competing

# Question 6- Let's practice making predictions of the response variable.
# CG Q6a # We'll make predictions using all 3 competing models for
####### a wet day that is 25 degrees, has 50% humidity and windspeed of 5.
####### Make a data frame of these values and call it newdata.
newdata-data.frame(weathersit=2,temp=25,hum=50,windspeed=5)
# CG Q6b # Now use ridefit model to predict ride count using
####### the predict() function with your newdata object.
predict(ridefit,newdata)
# CG Q6c # Now use the logridefit model to predict log ride count using
####### the predict() function with your newdata object.
predict(logridefit,newdata=newdata)
# CG Q6d # To put the prediction of the log ride count back onto the raw
####### ride count scale, wrap the line of code from Q6c in the exp()
####### function to "undo" the log transformation.
exp(predict(logridefit,newdata=newdata))
# CG Q6e # use the loglogfit model to predict log ride count using
####### the predict() function with your newdata object.
predict(loglogfit,newdata=bikes)
# CG Q6f # To put the prediction of the log ride count back onto the raw
####### ride count scale, wrap the line of code from Q6e in the exp()
####### function to "undo" the log transformation.
 # Question 6- Let's practice making predictions of the response variable.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!