Course web page for Statistical methods for linguistic research, at ESSLLI 2015, Barcelona (3-14 August 2015)

Instructor: Shravan Vasishth
Professor, Dept. of Linguistics
University of Potsdam, 14476 Potsdam
Email: vasishth at uni hyphen potsdam dot de
Home page: http://www.ling.uni-potsdam.de/~vasishth
Datacamp programming and co-development of homework assignments: Felix Engelmann


Do you need this course? Do the test to find out. No data are recorded, and no information about you is recorded.

Teaching evaluation

Click here for the teaching evaluations from the students at ESSLLI 2015.

Lecture notes for the courses (optional for ESSLLI)

You do not need to read any notes for ESSLLI; just follow the slides. These lecture notes are provided only in case you want to see the full lecture notes I use at Potsdam.
  1. Week 1 lecture notes: The informal introduction is here and more advanced notes on linear modeling are here
  2. Week 2 lecture notes: here

ESSLLI Schedule

Preparation needed for this course: I strongly advise students planning to take this course (week 1 or 2, or both) to work through the first two introductory R courses on datacamp, especially if they do not know R.
The two weeks are independent of each other, but I do assume in week 2 that you are familiar with frequentist statistics.

  • Week 1 (Aug 3-7 2015):
    Note: I have organized my slides by lecture rather than day. I may go faster or slower, depending on the class.
    All materials (slides as pdf and Rnw files, R code, data) can be downloaded from this github archive. Below, I just link to the slides and some shinyapps.
    Homework: Felix Engelmann and I have developed course exercises (automatically graded) that are delivered over datacamp. Do the exercises after the relevant lecture is done to sharpen your understanding. We are trying to improve on these exercises, so please send feedback on exercises to vasishth at uni-potsdam dot de. To do the exercises, (a) first sign up here as a team member, and (b) then go here to do the exercises.
    What we actually did on day 1: we finished the slides of lecture 1 up to slide 32. On day 2, I will finish the slides of lecture 1, and probably get to slide 12 or so of lecture 2.
    What we actually did on day 2: We got to slide 20 in lecture 2.
    What we actually did on day 3: We got to slide 53 in lecture 2. One question that came up was: what are degrees of freedom? Please take a look at this article.
    What we actually did on day 4: We got to slide 18 in lecture 3. One question that came up was: how did we get degrees of freedom 335 in the N2data? We have 14 subjects and 24 items, hence we have 14x24=336 data points. Because we do a one sample t-test, one mean is being estimated (the mean difference between the two conditions), so we nave n-1=335 data points. Another question was: if we have rejected the null with p-value less than 0.05, don't we have evidence in favor of some alternative? The language we will use to describe our results is always in terms of rejecting the null: there is (weak/strong) evidence that the mean (or the differences of means) is not zero. Think of it like this: if there is strong evidence against the null that mu = 0, then you have evidence that all other values of mu are possible, including ones that your favorite theory does allow and doesn't allow. So yes, you have evidence in favor of mu not being equal to 0, but that allows for a host of possibilities that your theory almost certainly excludes, so how can we conclude that there is evidence for our specific theory? Of course, if the sample mean has the sign consistent with your theory, that is your MLE, so you can say that the mean seems to be positive (but don't forget the possibility of a Type S error!). What you cannot say is that the p-value gives you evidence for your specific favorite alternative. In psychology and linguistics, researchers often make the leap that they have evidence for the specific alternative they have set up, but the logic of NHST does not allow that leap. The evidence is always with reference to the null. It is partly because of this bizarre situation that people like Gelman are so critical of NHST.
    What we actually did on day 5: We literally finished all the slides! Thanks everyone for being great students and asking excellent questions. I greatly enjoyed teaching this class.
    1. lecture 1: Lecture 1 slides, shinyapp for area under the curve.
      Homework: do Lecture 1: Basics, see here.
      Topic to be covered: very basic R usage, basic probability theory, random variables, including jointly distributed RVs, probability distributions, including bivariate distributions, Maximum Likelihood Estimation, sampling distribution of mean
    2. lecture 2: Lecture 2 slides, shinyapp for type I and II error.
      Homework: do Lecture 2: Hypothesis testing, see here.
      Topic to be covered: null hypothesis significance testing, t-tests, confidence intervals, type I error, type II error, power, type M and type S errors
    3. lecture 3: Lecture 3 slides
      an introduction to (generalized) linear models
      Homework: do Lecture 3: linear models, see here.
    4. lecture 4: Lecture 4 slides
      an introduction to linear mixed models
      Homework: do Lecture 4: linear mixed models, see here.
      Additional reading: Random effects structure for confirmatory hypothesis testing: Keep it maximal, by Barr, Levy, Scheepers, Tily, 2013, JML, Parsimonious mixed models, by Bates, Kliegl, Vasishth, and Baayen, ArXiv preprint.
  • Week 2 (August 10-14 2015):
    Prerequisites: I am assuming you know the contents of the first week's course. If you didn't attend the course, please read the lecture notes linked at the top of this page, or look at the slides linked above.
    All materials (slides as pdf and Rnw files, R code, data) can be downloaded from this github archive.
    Also, for entertainment, watch Andrew Gelman in A Stan is Born.
    Homework: I will release exercises soon.
    Github repository: here.
    1. lecture 1: See here.
      introduction to linear models and linear mixed models, introduction to Bayes' Theorem, some introductory remarks on Bayes vs frequentist methods
    2. lecture 2: here.
      some classical conjugate form results, examples of simple models in JAGS using linear regression
      Homework: Please download these exercises: click here.
    3. lecture 3: here.
      MCMC sampling, Gibbs sampling, evaluating model convergence and model fit, using transformations (Box-Cox procedure)
    4. lecture 4: here.
      fitting linear mixed models using JAGS and Stan, using informative priors, example of meta-analysis, further reading
      Please see our RePsychLing package for examples of linear mixed models, both maximal and non, and Bayesian and non.
Additional readings, videos, and code:
  1. A nice summary of Bayesian data analysis here.
  2. Bayesian LMMs using Stan: A tutorial for psychologists, linguists, and cognitive scientists, by Sorensen, Hohenstein, and Vasishth (Sven Hohenstein has joined us as co-author)
  3. Multinomial processing trees tutorial by Bruno Nicenboim
  4. Mike Betancourt, one of the developers of Stan, on Hamiltonian Monte Carlo and Stan: HMC, and Stan. Also see his youtube videos: here and here.
  5. A very light historical note on Monte Carlo on youtube: here.

Github repository

You can also visit my Github repository for my statistics notes. There are in various degrees of incompleteness (and my apologies: there are a few mistakes that I have yet to correct) and are heavily based on an MSc program in Statistics taught at the University of Sheffield's School of Mathematics and Statistics; I did this MSc during 2012-2015 part-time as a distance learner. I documented my experiences in a detailed review of the MSc program here. Related: before I did the MSc, I completed a one-year Graduate certificate in statistics (2011-12), this is also taught at the University of Sheffield. The review is here.

Comments, criticism, and requests for specific topics are most welcome (email: vasishth squiggle rz dot uni-potsdam dot de).