PSYC 7804: Regression With Lab
Slides: Click to access Lab presentations. To navigate slides, use left/right arrow keys (on laptop) or swipe left/right (on tablet). The slides are created with the quarto extension of RStudio and use the revealjs framework.
Code: Click to download raw R code that is used in the Lab slides. The code is included in a .Rmd file that is divided according to the title of each Lab slide.
Activity: Click to download Lab activity with practice questions. A Lab activity presents questions of varying difficulty related to the respective Lab.
Activity solution: Click to download solutions to Lab activity as a .Rmd file. The solutions presented are just one of many ways to solve the activity questions.
Spring 2026 Spring 20251. Descriptive Techniques and One-Predictor Regression
This lab introduces descriptive techniques, both numerical and graphical, for one-dimensional and two-dimensional data. Further, one-predictor regression is introduced. Find interpretation of regression coefficients, graphical representations of one-predictor regression, and a brief introduction to assumption checks.
Slides Code Activity Activity Solution2. Linear Transformations and Significance Tests
This lab introduces linear transformations such as mean-centering and standardization. The graphical comparisons and interpretation of regression results with linearly transformed variables are discussed. Significance tests are also touched upon briefly.
Slides Code Activity Activity Solution3. Two-Predictor Regression
This Lab introduces regression with multiple predictors. The slides include interactive 3D visualization of a scatterplot among three variables, as well as the regression plane that is described by the two-predictor regression equation. R2 is also introduced and is framed as an effect size that capture the reduction in uncertainty about the dependent variable given a set of independent variables.
Slides Code Activity Activity Solution4. Added Variable Plots and Bootstrapping
This lab introduces added variable plots as a way of visualizing partial regression coefficients. The idea of bootstrapping and its applications in the context of linear regression are also discussed. For learning purposes, this Lab also includes raw code that details the steps to create added variable plots, as well as bootstrapped confidence intervals for R2.
Slides Code Activity Activity Solution5. Semi-partial, Partial-correlations, and Model Comparison
This Lab introduces semi-partials and partial-correlations, and contrasts them with correlation. This lab also discusses model comparison with hierarchical regression and information criteria methods such as AIC and BIC.
Slides Code Activity Activity Solution6. Multicollinearity, Dominance Analysis, and Power
This Lab touches upon multicollinearity in linear regression and its consequences. Dominance analysis is also discussed as a method to evaluate relative importance of predictors in a regression. Power in regression and criticisms of practices related to power are discussed.
Slides Code Activity Activity Solution7. Quadratic regression and non-linear alternatives
This Lab goes over quadratic regression and detailed interpretations of its regression coefficients. This Lab also includes a brief introduction to piecewise regression.
Slides Code Activity Activity Solution8. Interactions Between Continuous Variables
This Lab goes over interaction effects (AKA moderation) between continuous variables. This Lab includes interpretation of interaction effects, 3D interactive representations, simple slopes interpretations and visualizations, and Johnson-Neyman plots.
Slides Code Activity Activity Solution9. Categorical Predictors
Coming soon!
Slides Code Activity Activity Solution10. Interactions with Categorical Predictors
Coming soon!
Slides Code Activity Activity Solution11. Mediation Analysis and Missing Data
Coming soon!
Slides Code Activity Activity Solution12. Regression Diagnostics
Coming soon!
Slides Code Activity Activity Solution13. Generalized Linear Models
Coming soon!
Slides Code Activity Activity Solution1. Descriptive Statistics and Plots
This Lab goes over how to import data into R, compute some descriptive statistics, and the logic and process behind creating plots with ggplot . An in depth-explanation of QQplots is also included in the last slides.
Slides Code Activity Activity Solution2. One-Predictor Regression
This Lab discusses how to interpret one-predictor regression output, how to use regression to make predictions, what residuals are, and how to run a standardized regression in R. The appendix touches upon the meaning of a regression model and the root of regression assumptions.
Slides Code Activity Activity Solution3. Significance Tests and Reporting Results
This Lab discusses how to interpret one-predictor regression output, how to use regression to make predictions, what residuals are, and how to run a standardized regression in R. The appendix touches upon the meaning of a regression model and the root of regression assumptions.
Slides Code Activity Activity Solution4. Introduction To Two-Predictor Regression
This Lab introduces multiple regression, contrasts one-predictor and multiple regression, includes interactive 3D visualization of regression planes, and goes over R2 and the meaning of the term variance explained.
Slides Code Activity Activity Solution5. Added Variable Plots and Bootstrapping
This lab introduces added variable plots as a way of visualizing partial regression coefficients. The idea of bootstrapping and its applications in the context of linear regression are also discussed. For learning purposes, this Lab also includes raw code that details the steps to create added variable plots, as well as bootstrapped confidence intervals for R2.
Slides Code Activity Activity Solution6. Semi-partial, Partial-correlations, and Model Comparison
This Lab introduces semi-partials and partial-correlations, and contrasts them with correlation. This lab also discusses model comparison with hierarchical regression and information criteria methods such as AIC and BIC.
Slides Code Activity Activity Solution7. Multicollinearity, Dominance Analysis, and Power
This Lab touches upon multicollinearity in linear regression and its consequences. Dominance analysis is also discussed as a method to evaluate relative importance of predictors in a regression. Power in regression and criticisms of practices related to power are discussed.
Slides Code Activity Activity Solution8. Quadratic regression and non-linear alternatives
This Lab goes over quadratic regression and detailed interpretations of its regression coefficients. This Lab also includes alternative methods such as piece-wise regression and splines.
Slides Code Activity Activity Solution9. Interactions Between Continuous Variables
This Lab goes over interaction effects (AKA moderation) between continuous variables. This Lab includes interpretation of interaction effects, 3D interactive representations, simple slopes interpretations and visualizations, and Johnson-Neyman plots.
Slides Code Activity Activity Solution10. Categorical Predictors
This Lab introduces the use of categorical predictors in linear regression. Different coding schemes for categorical predictors such as dummy coding and contrast coding are described. The equivalence of regression with categorical predictors and t-tests and ANOVAs is also discussed.
Slides Code Activity Activity Solution11. Interactions with Categorical Predictors
This lab introduces Interactions involving categorical predictors. Methods for probing interactions between categorical and continuous predictors are discussed.
Slides Code Activity Activity Solution12. Mediation Analysis
This lab introduces mediation analysis with path models using lavaan. Aside from simple mediation, examples of parallel mediation and moderated mediation are also shown.
Slides Code Activity Activity Solution13. Missing Data
This lab presents a short introduction to issues related to missing data. Missing data mechanisms, as well as consequences of missing data mishandling are discussed (e.g., bias of results). Full information maximum likelihood (FIML) is introduced as a way of handling missing data. More advanced missing data methods are briefly mentioned.
Slides Code Activity Activity Solution14. Regression Diagnostics
This lab discusses leverage, distance, and influence, three properties of individual data points that may impact regression results and conclusions. The regression diagnostics discussed are: hat values, studentized Residuals, DFFITS, Cook’s D, COVRATIO, and DFBETAS. Influence of outliers on regression results is also discussed.
Slides Code Activity Activity Solution