PSYC 6802: Introduction to Psychology Statistics
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 .qmd 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 .qmd file. The solutions presented are just one of many ways to solve the activity questions.
Fall 2025
1. Introduction to R
This Lab introduces the R programming language and RStudio. This Lab also covers core concepts such as objects, functions, packages, and object subsetting. Additionally, this Lab introduces Quarto as a tool for creating neat PDF reports.
Slides Code Activity Activity Solution2. Descriptive Statistics, Data Manipulation, and Plotting
This Lab goes over some basic descriptive statistics, data manipulation with
dplyr, and plotting with
ggplot2.
3. Chi-Square
This lab introduces some categorical data analysis methods for contingency tables. In particular, this Lab goes over χ2 tests, likelihood ratio test, and Fisher’s exact test. Further, the Lab also goes over odds and risk, as well as odds ratios and relative risk.
Slides Code Activity Activity Solution4. t-Test
This Lab introduces one-sample, paired-samples, and independent-samples t-tests, as well as a non-parametric alternative. Cohen’s d, a measure of effect size for mean differences, as well as methods to asses the assumption of normality are also discussed.
Slides Code Activity Activity Solution5. Power
This lab introduces power analysis with the
pwr package. The types of power analyses discussed in this lab are mostly for basic statistical analyses such as χ2 tests, and t-tests. The appendix also includes power analyses examples for F-tests, correlation, and regression.
6. Correlation and Regression
This Lab introduce both correlation and regression. The lab also gives examples of unstandardized and standardized regression results and talks about the differences and similarities between the two. The exploration of residuals as an integral part of regression analysis is emphasized. Finally, The lab introduces R2 as an effect size for regression and provides graphical illustrations of the idea of variance explained.
Slides Code Activity Activity Solution7. One-Way ANOVA
This lab introduces one-way ANOVA. The lab also shows how to calculate ANOVA effect sizes such as η2 and ω2, along with post HOC comparisons and some basic contrasts. The lab frames ANOVA in terms of additional variance explained in the DV by using group means and provides more details on sums of squares in the appendix.
Slides Code Activity Activity Solution8. Factorial ANOVA
This Lab introduces factorial ANOVA in the context of two categorical IVs. Interaction effects, the idea of simple main effects, and partial effect sizes are discussed. The Lab also touches upon the choice of different types of sums of squares.
Slides Code Activity Activity Solution9. Multiple Regression I
This Lab introduces multiple regression, as well as regression with categorical predictors. Residual plots, added variable plots, interpretation of regression coefficients and R2 in the context of multiple regression are discussed. The Lab includes an interactive 3D visualization of the regression plane, as well as code to automatically generate an APA style table for regression results.
Slides Code Activity Activity Solution10. Multiple Regression II
This Lab introduces partial and semi-partial correlations. Additionally, the Lab details different regression diagnostics and ways to check whether some individuals data-points may have a strong influence on the regression results. Finally, the Lab introduces the issue of multicollinearity, its consequences, and a graphical representation of the phenomenon.
Slides Code Activity Activity Solution11. Logistic Regression
This Lab introduces logistic regression. Interpretation of logistic regression coefficients, likelihood ratio test for model comparison, as well as some basic metrics to evaluate logistic regression based on confusion matrices are discussed. The idea of splitting data into training and test partition to test model predictions on out-of-sample data is also discussed briefly.
Slides Code Activity Activity Solution12. Third Variables
This lab briefly introduces moderation and mediation. In the case of moderation, the idea of simple slopes is introduced. In the case of mediation, an example of a simple mediation model in lavaan is shown. A more detailed treatment of both topics can be found in
PSYC 7804: Regression With Lab.
13. Latent Variables
This lab briefly introduces exploratory factor analysis (EFA) and confirmatory factor analysis (CFA). Given the breadth of the topic, only a really small subset of the methods and practices related to EFA and CFA are discussed.
Slides Code Activity Activity Solution14. Repeated Measures
This lab introduces some analysis techniques used to deal with repeated measures. The lab introduces both repeated measures ANOVA and hierarchical linear modeling (HLM).
Slides Code Activity Activity Solution