I taught two graduate courses in Research Methods/Statistics from Fall 2012 – Spring 2021, one on ANOVA and one on Regression. I wrote about 20 R scripts for these courses using packages such as tidyverse and brms, along with examples in JASP and SPSS. If you are an instructor who will be teaching courses like these in the future, and you would like my course materials then email me at email@example.com and I will share my materials.
If you are in industry and would like me to give a short course on statistics to your company or team, or to help with statistical consulting please email me at firstname.lastname@example.org. I can help with most statistical modeling questions, and I am interested in applied problems.
Since fall 2021, I have taught an undergraduate Introduction to Cognition course. I made a few slides that focus on future directions for students after taking the course, such as pursuing a Ph.D. or career in a field related to cognitive science, and other skills to develop or courses to take to prepare for research in cognitive science. Those slides are here.
Below are some resources for developing skills needed for behavioral research:
Useful R Intro for new beginners here
I recommend R For Data Science
A nice example of multivariate regression in R here
Data files and R code for the above lecture can be found on the OSF: here
Introductory Videos to Using R for Data Analysis:
Very Basic Introduction – just loading a data set into R – The purpose of this video is to help people who have never coded before, or never used R before, break through the wall by loading a data set into R. When I first started using R, I found few tutorials that walked through how to actually get a data set in R – most tutorials used data sets that were preloaded into R.
Modifying Data Frames in R – This introductory level video shows how R can easily be used to add new variables to data frames, or to modify existing variables.
Using dplyer and ggplot to Analyze and Plot Data – dplyer is one of the best tools around for quickly analyzing data, and it interfaces well with ggplot2. A student who masters these two packages will have greatly increased their powers of data analysis. This video is designed to make the logic of dplyer and ggplot clear.
Using brms to Quickly Plot Simple Slopes for Interactions between Continuous Variables from Regression – This video shows an example of how to plot simple slopes to show an interaction between continuous variables from regression. Plotting these slopes is often time consuming, but brms’s ‘conditional_effects’ command will easily plot them. Then, I show how to extract the plot brms produces in order to customize it (adding titles, changing axis labels, background color, etc.) Code and Data for this video
Multilevel modeling lecture that gives a brief overview, as well as examples of multilevel models in R, including one example where the response is at the trial level (participants make repeated choices on each trial).
Logistic Regression using R and JASP
Mediation example using R
Criticisms of Null Hypothesis Significance Testing
PSYC 607 (Inferential Statistics and Experimental Design)
For Fall 2018 I redid the lecture on Descriptive Statistics to include hands on practice using R’s ggplot2 package to plot different types of data. Students brought their laptops and did the R exercises during the lecture. Many students had no prior programming experience. The materials for this lecture are available on the osf by clicking here
I have taught Inferential Statistics and Regression at the graduate level since 2012. These are the two courses graduate students in the Psychology department at Texas A&M University are required to take their first year.
Recently I spent a large amount of time learning about Bayesian inference and Bayesian data analysis. This approach makes much more sense to me, and I gave a short course to graduate students and faculty at Texas A&M in May 2017. The course was based on John Kruschke’s (excellent) book Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan. The book’s website is here.
I also recommend JASP. It can basically replace SPSS to perform traditional analyses and it also easily performs Bayesian analyses from the General Linear Model, yielding Bayes Factors that can replace p values.
The course covers Bayesian Inference and includes hands on lectures that cover both the model comparison approach that utilizes Bayes Factors, and the parameter estimation approach that focuses on 95% highest density (or credible) intervals. I favor reporting Bayes Factors instead of p values and 95% HDIs for parameters instead of confidence intervals.
I have provided the power points for the course lectures to facilitate the field’s switch to Bayesian approaches. I highly recommend purchasing Kruschke’s book as well. The JASP tutorial is based on a tutorial E.J. Wagenmakers and others have written and made available on the Open Science Framework here.
Day 1 Lectures
Day 2 Tutorials
Data files for the above lecture can be found on the OSF here
*Mac users had trouble getting the JAGS code to work until they installed the latest version of iquartz (or something like that).