LINEAR REGRESSION MODULES [II]
Normality Normality: Multiple regression assumes that the error terms are normally distributed. Plot QQ (Quantile-quantile) plots are used to visually check the normality of the data. • As all the points fall approximately along the straight line, we can assume normality. • R Syntax: qqnorm(model$residuals, pch = 1, frame = FALSE) plot(model$residuals) autoplot(model) Remark: autoplot requires installment of ggforify if(!require(devtools)) ges("devtools") devtools::install_github("sinhrks/ggfortify") library("ggfortify") Linearity Linearity: There must be linear relationship between response variable and independent variables. plot(Carseats$Price,Carseats$Sale s) (inverse linear relationship) No Multicollinearity No Multicollinearity: the independent variables are not highly correlated with each other. corrmatrix- (Carseats$CompPrice,Carseats$Income ,Carseats$Advertising) cor(corrmatrix) ges("corrplot") Homoscedasticity • Homoscedasticity: the variance of error terms are similar across the values of the independent variables (Plot of residuals vs predictor variables). par(mfrow=c(1,2)) plot(Carseats$Income,model$residuals) plot(Carseats$Advertising, model$residuals) R-Squared R-squared (R2 ), also known as a Coefficient of Determination, is a statistical measure that represents the proportion of the variance for a dependent variable that's explained by an independent variable or variables in a regression model. Adjusted R-Squared • The adjusted R-squared is a modified version of R-squared that has been adjusted for the number of predictors in the model. The adjusted R-squared increases only if the new term improves the model more than would be
Written for
- Institution
- ECON006C
- Course
- ECON006C
Document information
- Uploaded on
- February 21, 2023
- Number of pages
- 18
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
linear regression modules ii
-
normality normality multiple regression assumes that the error terms are normally distributed plot qq quantile quantile plots are used to visually check the normalit