Week 3 : Empty BP and WP models. Lab: basic models and graphs

Admission requirements What you need to read before coming to class on Tuesday .
Chapter: 3 - Introduction to Within-Person Analysis and Model Comparisons
Lecture: Introduction to Within-Person Analysis and RM ANOVA slides | watch parts 1 and 2 of Lecture 3

Reprots due

Assignment Summarize the your knowledge of R in a markdown report. Use this cheatsheet to ensure that your report contains at least:

  • 3 different headings
  • 1 ordered list
  • 1 unordered list
  • 1 definition list
  • 3 kinds of emphasis
  • 1 link to a webpage
  • 1 image call
  • 2 tables

Think about this report as the webpage that you’d go to whenever you’d be working in R. Right now there may not be much on it, but as you grow in your knowledge of R programming throughout the semester you’ll be editing and expanding it, so that by the time you complete the course you have a set of customized reference materials about all things R.

Markdown is the basic skill you need to build webpages like these. So putting everything you learned last week together, come up with a basic webpage on which you can organize your knowledge of R so far. Part of the challenge is having enough knowledge to organize. If that is the obstacle, I direct you to swirl() and datacamp resource from the first week (http://andkov.github.io/psy564/1.html#learning-r).

NOTE: You will not be graded on the content, but be prepare to discuss your work with the class.

Friday Session

Today we’ll explore some of the features of GitHub and see how markdown documents can be stored and shared on the web.

This is a master branch of a repository that we have created for this course. Right under statistics bar and left to the hyperlinked address line of this folder you’ll see a branch selector. master branches will typically have data files, while branches specially named gh-pages contain script and pages that are published as this website

Today we will look at the data example 3a from chapter 3 of Longitudinal Analysis by Lesa Hoffman. You will find all the necessary files at

 ./Chapters/03/R_Chapter3/

after you download and unzip the folder of this repository.

 ./Chapters/03/R_Chapter3/hoffman-ch3.R

contains R code that conducts the analysis and

 ./Chapters/03/R_Chapter3/hoffman-ch3.Rmd

contains the report. You can view .html files stored on GitHub.com by pasting their url address into HTMLpreviewer

Working files

  • hoffman-ch3.R contains the script that replicates example 3a from Chapter 3 of Longitudinal Analysis by Lesa Hoffman. We fit empty between-person (3.1) and empty within-person (3.2) models to the supplied dataset containing 2 measures for 50 subjects.
  • hoffman-ch3.Rmd contains annotations to what happens in hoffman-ch3.R script. HTML is “knitted” in RStudio by knitr package by combining .R and .Rmd files: explainations for computer and for humans, respectively. This report is a self-contained account of two statistical models. It is an example of reports you will produce as your weekly assignments, so take careful note of its anatomy.