Question: Use R for each question. Please submit your word / pdf document and your R - script to Canvas. Run library ( tidyverse ) before

Use R for each question. Please submit your word/pdf document and your R-script to Canvas.
Run library(tidyverse) before attempting the questions.
Question 1. Time Trends
Download the dataset called Stock Price on Canvas, import it into R.
Hint: You can do this manually, or use these codes (arrange the dictionary accordingly):
library(readxl)
Stock Price <- read excel(/Desktop/Stock Price.xlsx)
View(Stock Price)
Understanding the dataset:
(a) Explain the dataset: What are the variables in the dataset? How is the time variable constructed (day/ hour etc)?
What is the time period captured in this dataset? What is the minimum price? What is the maximum price?
(b) Draw a graph of price against time, where price is on the y-axis and time is on the x-axis.
Linear time trend model:
(c) Construct a linear time trend model: pricet =\beta 0+\beta 1\times time + ut.
Call this model model linear. What does the estimate for the time variable in the linear regression model represent?
How would you interpret its value in the context of the stock price data we are analyzing? Is the estimate for the time
variable significant at the 5% level?
(d) Do part (b) again, but this time fit a linear regression line to the scatter plot. By looking at this graph only, what
initial insights can you draw regarding the adequacy of the fitted model in capturing the relationship between stock prices
and time? Report the time periods where the model is likely to overpredict or underpredict the stock prices (you dont need
to give overly specific time ranges).

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!