Question: bikes < - read.csv ( bikeshare . csv , strings = T ) What is wrong about the following code: # CG Q

bikes<-read.csv("bikeshare.csv", strings = T) What is wrong about the following code: # CG Q3b # Fit a regression using the variables from Q2a
########## with the addition of the lagged variable.
########## Call your fitted model ar1fit.
arlfit <- glm(cnt~temp+hum+windspeed+weathersit+holiday+mnth+lag, data=bikes) # CG Q3c # Find the R-squared using the same code
########## structure from previous HWs and lecture.
1-arlfit$deviance/arlfit$null.deviance # CG Q3d # Use similar code to Q2f to print the
########## autocorrelation at lag 1 for the residuals
########## from your AR regression.
acf(arlfit$residuals, plot=F)[1]

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!