# 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)
# 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.
# CG Q6c # Now use the logridefit model to predict log ride count using
####### the predict() function with your newdata object.
# 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.
# CG Q6e # use the loglogfit model to predict log ride count using
####### the predict() function with your newdata object.
# 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.
Please help... w/ 6b-6f
it is not formatted as predict(ridefit, newdata) OR predict(ridefit,newdata=newdata)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps