R Script RDA
This R script performs a logistic regression and discriminant analysis on the Weekly dataset
from the ISLR package to predict stock market movements. In Question 1, logistic regression is
applied to assess the relationship between stock market direction and lagged returns,
evaluating model accuracy on training and testing data. Additionally, Linear Discriminant
Analysis (LDA) and Quadratic Discriminant Analysis (QDA) are used to compare classification
performance. Question 2 applies LDA to a small custom dataset to classify binary outcomes
based on a predictor variable. The model is used to predict class probabilities for new data
points.