Marinstatslectures

Linear Regression with R

Series 5 of R programming video tutorials show you how to fit a linear regression model, produce summaries for the model, and check validity of linear regression assumptions made when fitting the model using R programming software. These R videos also show you how to interpret model output from R and how to use residual plots to check the linearity assumption, constant variance assumption and the assumption of normality. Here you will learn to create a categorical variable (a factor or qualitative variable) from a numeric variable, use dummy or indicator variables to include categorical or qualitative variables or factors into a regression model, change the reference/baseline category for a categorical variable in a linear regression model, include a categorical variable in a regression model, and interpret the model coefficients with R. Here you will be able to use R programming software to interpret interaction or effect modification in a linear regression model between two factors (two categorical variables), use the partial F-test to compare nested models for regression modelling, and fit polynomial regression models and assess these models using the partial F-test .

Reminder: Simple linear regression (SLR) is a way of modeling the linear relationship between a single quantitative explanatory variable (X) and a single quantitative outcome variable (Y). Multiple linear regression (MLR) is a method for modeling the linear relationship between a quantitative outcome variable (Y) and many explanatory variables (many X's).

 

 

Here are the R Video Tutorials: 

play button (R video tutorial 5.1): Simple Linear Regression in R:  How to Fit a Linear Regression Model in R

play button (R video tutorial 5.2): Checking Linear Regression Assumptions in R:  How to test linear regression assumptions in R

play button  (R video tutorial 5.3): Multiple Linear Regression in R : How to fit and interpret output from a multiple linear regression model in R and produce summaries for it.

play button(R video tutorial 5.4): Changing Numeric Variable to Categorical in R:  How to create a categorical variable (factor or qualitative variable) from a numeric variable in R to deal with nonlinearity in linear regression model.

play button (R video tutorial 5.5): Creating Dummy Variables or Indicator Variables in R: How to create dummy or indicators variables to include categorical variables in a regression model with R

play button (R video tutorial 5.6): Change Reference (Baseline) Category in Regression Model with R: How to change the reference/baseline category for a factor or categorical/qualitative variable in a linear regression model (reparameterize data) in R

play button (R video tutorial 5.7): Including Variables/ Factors in Regression with R, Part I: How to include a categorical variable in a regression model and interpret the model coefficient R

play button (R video tutorial 5.8): Including Variables/ Factors in Regression with R Part II: How to include a categorical variable in a regression model and interpret the model coefficient with R

play button (R video tutorial 5.9): Multiple Linear Regression with Interaction in R: How to include interaction or effect modification in a regression model in R

play button (R video tutorial 5.10): Interpreting Interaction in Linear Regression with R: How to interpret interaction or effect modification in a linear regression model, between two factors with example in R

play button (R video tutorial 5.11): Partial F-Test for Variable Selection in Linear Regression with R: How to use Partial F-test to compare nested models for regression modelling in R

play button (R video tutorial 5.12): Polynomial Regression in R: How to fit polynomial regression model and assess polynomial regression models using the partial F-test with R

 

These videos can be used by beginners in R and anyone interested in statistic with R and data science with R. No prior knowledge of R programming is needed, just a passion to learn! But we highly recommend to start these lectures by watching the Series 1 of R video tutorials first! 

To install R go to http://www.r-project.org and for RStudio go to http://www.rstudio.com

Make sure to use the free datasets provided for you to get some hand on experience while watching the tutorials!

males-chart stats2