# QUESTION 0--- call in the data. # CG Q0a # Read...
70.2K
Verified Solution
Question
Accounting
# QUESTION call in the data. # CG Qa # Read the data file bikeshare.csv into R ########## and name the object bikes. Use strings T # QUESTION Data prep. # CG Qa # Run str on the bikes data frame to see ########## the quantitative variables and to confirm ########## the strings T argument read in character ########## data as a factor. # CG Qb # Run the following lines of code to make ########## month and weekdays, and holiday and work day ########## indicators factors. bikes$mnth factorbikes$mnth bikes$holiday factorbikes$holiday bikes$weekday factorbikes$weekday bikes$workingday factorbikes$workingday # CG Qc # Run str on the bikes data frame to see that ########## the Qb code made these variables factors. # QUESTION Fit a regression model and inspect results # CG Qa # Fit a regression model called fit to model ride ########## count by temperature, humidity, windspeed, ########## weathersit, holiday indicator, and month. # CG Qb # Use the summary function to print the results of ########## the regression. # CG Qc # Use the coef function to print the ########## coefficient for September. Use the same ########## code you learned in previous regressions HWs # CG Qd # Choose the correct interpretation. ########## A: As month increases by expect count to decrease by ########## B: As month increases by expect count to increase by ########## C: We expect count in September to be lower than for January. ########## D: We expect count in September to be higher than for January. ########## Use paste with the letter choice in quotes. # CG Qe # Calculate the Rsquared using the formula from ########## previous regression HWs with deviance and null.deviance # CG Qf # Find the autocorrelation at lag for the residuals ########## from the regression. Use the code below. acffit$residuals, plotF # CG Qg # Based on the results from Qf is there autcorrelation ########## at lag Type pasteY or pasteN # QUESTION Fit an AR model to account for autcorrelation. # CG Qa # Run the provided code to add lagged count ########## and check that it worked as expected. bikes$lag cNA bikes$cnt:nrowbikes #create lagged variable headbikesccnt"lag" # confirm it worked as planned # CG Qb # Fit a regression using the variables from Qa ########## with the addition of the lagged variable. ########## Call your fitted model arfit. # CG Qc # Find the Rsquared using the same code ########## structure from previous HWs and lecture. # CG Qd # Use similar code to Qf to print the ########## autocorrelation at lag for the residuals ########## from your AR regression. # CG Qe # Use the coef function to print the ########## coefficient for the lag term. # CG Qf # Type pasteY is the autocorrelation at ########## lag is essentially Otherwise, use pasteN # CG Qg # The coefficient for the lag term indicates ########## A: a random walk ########## B: stationary, meanreverting ########## C: diverging ########## Use paste with the selected letter in quotes.
# QUESTION call in the data.
# CG Qa # Read the data file bikeshare.csv into R
########## and name the object bikes. Use strings T
# QUESTION Data prep.
# CG Qa # Run str on the bikes data frame to see
########## the quantitative variables and to confirm
########## the strings T argument read in character
########## data as a factor.
# CG Qb # Run the following lines of code to make
########## month and weekdays, and holiday and work day
########## indicators factors.
bikes$mnth factorbikes$mnth
bikes$holiday factorbikes$holiday
bikes$weekday factorbikes$weekday
bikes$workingday factorbikes$workingday
# CG Qc # Run str on the bikes data frame to see that
########## the Qb code made these variables factors.
# QUESTION Fit a regression model and inspect results
# CG Qa # Fit a regression model called fit to model ride
########## count by temperature, humidity, windspeed,
########## weathersit, holiday indicator, and month.
# CG Qb # Use the summary function to print the results of
########## the regression.
# CG Qc # Use the coef function to print the
########## coefficient for September. Use the same
########## code you learned in previous regressions HWs
# CG Qd # Choose the correct interpretation.
########## A: As month increases by expect count to decrease by
########## B: As month increases by expect count to increase by
########## C: We expect count in September to be lower than for January.
########## D: We expect count in September to be higher than for January.
########## Use paste with the letter choice in quotes.
# CG Qe # Calculate the Rsquared using the formula from
########## previous regression HWs with deviance and null.deviance
# CG Qf # Find the autocorrelation at lag for the residuals
########## from the regression. Use the code below.
acffit$residuals, plotF
# CG Qg # Based on the results from Qf is there autcorrelation
########## at lag Type pasteY or pasteN
# QUESTION Fit an AR model to account for autcorrelation.
# CG Qa # Run the provided code to add lagged count
########## and check that it worked as expected.
bikes$lag cNA bikes$cnt:nrowbikes #create lagged variable
headbikesccnt"lag" # confirm it worked as planned
# CG Qb # Fit a regression using the variables from Qa
########## with the addition of the lagged variable.
########## Call your fitted model arfit.
# CG Qc # Find the Rsquared using the same code
########## structure from previous HWs and lecture.
# CG Qd # Use similar code to Qf to print the
########## autocorrelation at lag for the residuals
########## from your AR regression.
# CG Qe # Use the coef function to print the
########## coefficient for the lag term.
# CG Qf # Type pasteY is the autocorrelation at
########## lag is essentially Otherwise, use pasteN
# CG Qg # The coefficient for the lag term indicates
########## A: a random walk
########## B: stationary, meanreverting
########## C: diverging
########## Use paste with the selected letter in quotes.
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
- Unlimited Question Access with detailed Answers
- Zin AI - 3 Million Words
- 10 Dall-E 3 Images
- 20 Plot Generations
- Conversation with Dialogue Memory
- No Ads, Ever!
- Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Other questions asked by students
StudyZin's Question Purchase
1 Answer
$0.99
(Save $1 )
One time Pay
- No Ads
- Answer to 1 Question
- Get free Zin AI - 50 Thousand Words per Month
Best
Unlimited
$4.99*
(Save $5 )
Billed Monthly
- No Ads
- Answers to Unlimited Questions
- Get free Zin AI - 3 Million Words per Month
*First month only
Free
$0
- Get this answer for free!
- Sign up now to unlock the answer instantly
You can see the logs in the Dashboard.