You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains basics strategies, codes, and scripts of regression analysis learnt in the class Statistics 501 by Prof. Lynn Lin at Penn State. It focused on tools and techniques for performing regression analysis in R.
This chapter included introduction to RStudio (IDE), R basics, vectors, matrices, data structures,conditional statements, loop statements, function.
Chapter 2. Statistical Data Analysis
This chapter included basics of plotting graphs in R, altering the size of plot margins, plotting character, color, type, labels on axis, title fot the graph, hostograms, scatter plots, boxplot, and quantile functions.
Chapter 3. Simple Regression Analysis
This chapter introduced concept of simple regression analysis and its uses. Regression analysis is the most widely used statistical tool for understanding relationships among variables. Prediction and forecasting can be performed using regression analysis.
Regression models conditional distribution of Y given X=x, i.e., P(Y=y|X=x). Given a specific value of X (i.e., X=x), we can predict the value of Y. Simple linear regression models relationship between two variables, X as explanatory variable (or Predictor) and Y as response (or Dependent) variable. Linear relationships are easy to work with and are a good approximation in lots of real word problems.
Chapter 4. Diagnostics and Transformations for Simple Linear Regressions
This chapter introduces the analysis of simple linear regression models for accuracy and shortcomings. Regression functional form can be invalid if some explanatory variables are missing, presence of non-linear terms and outliers, faulty residual assumptions, etc.
This chapter includes:
a. Residual plots
b. Leverage Points
c. Outliers
d. R-squared
e. Standardized residuals
f. Cook's Distance
g. Diagnostics Plots for Regression model
h. Transformation
Chapter 5. Multilinear Regression
This chapter introduced concept of Multilinear regression analysis and its advantages. Multiple linear regression is an extension of simple linear regression. It is used to describe scenarios of product demand models with demand variable depending on competitors' prices, advertising, demographics, etc or Multi-factor asset pricing models, Fama-French three-factor model, many variables used to describe the returns of a portfolio or stock.
This chapter includes:
a. F-test
b. Anova
c. Ancova
Chapter 6. Diagnostics and Transformation for MLR
This chapter introduces the analysis of fiited Multilinear regression model. The model can be assessed for the effects of one or more predictors on the model, outliers, leverage points, transformation of predictor or response variable or both if invalid model has been fit, etc.