CODE IN R
This question should be answered using the Weekly data set,which is part of the ISLR package (R package) from the book“Introduction to statistical learning with applications in R.” Thisdata is similar in nature to the Smarket data from the chapter 4’slab, except that it contains 1,089 weekly returns for 21 years,from the beginning of 1990 to the end of 2010.
FILE IN R:https://github.com/elenawangcap/ml/tree/master/Review
(a) Produce some numerical and graphical summaries of the Weeklydata. Do there appear to be any patterns?
(b) Use the full data set to perform a logistic regression withDirection as the response and the five lag variables plus
PayPal Gateway not configured
PayPal Gateway not configured