Kia ora!
Welcome to PSYC344.
I am Usman Afzali, the course coordinator and lecturer of the course. I built this website during Jan, 2023 and will keep maintaining it in the future.
This repository contains R code for statistics labs of the Year 3 Intermediate Research Methods and Statistics course taught at the School of Psychology, Speech and Hearing, University of Canterbury. The code is specific to the 2022 Summer course (2022-2023), but is very similar to the previous and hopefully future occurrences of the course.
In addition to statistics labs, some weekly introduction slides and the Course Outline are available too.
For the next course occurrence (July, 2023), weekly lecture slides will be made available too.
Please access the PSYC344 Website to access and live-use notes and executable code.
First, let's learn how to use the available code for lab files.
Each of the lab files is a Quarto Markdwon or .qmd document.
If you have background in coding and are just looking for a piece of code, or if you want to browse the code, you can access the Labs section and click on the relevant lab. The R code in this website is executable. Relevant code can be copied and ran on R scrip, R markdown or Quarto markdown.
Each of the lab files in this repo is a Quarto Markdwon or .qmd document.
If you want to access the very .qmd documents to use and replicate the code, you should:
-
Use the latest version of
RStudio, at leastVersion: 2022.12.0+353or later on your computer. -
Within
RStudio, click onnew filedrop down menu and open a newQuarto Document(see the first figure), and name it. -
Once the
.qmddocument is opened, go to thesourcetab, erase the default code and paste the code from the corresponding lab file (from line 1 up to the final line). Then hitRender. You will see output in theViewermenu. -
You can click
Show in a new windowto open rendered code in your local browser window (see the second figure for highlighted commands).
These labs are not included as they don't involve any data analysis.
Use the file Lab3-Descriptive-Stats.qmd.
Use Lab4-EFA-and-CFA.qmd.
Use Lab5-t-test.qmd.
Further lab files are yet to be added.
Slides are made using revealjs on Quarto. There are three ways to use them:
-
Use live: From Presentations, click the corresponding presentation. They can be displayed live simply by clicking on them and using the keyboard
arrow keys. -
Save as pdf: Get to the corresponding presentation as explained above. This option only works with
Google Chromeas explained here. -
The
revealjsfiles: The original code files are in the current repo inside thepresentationsfolder.
The process of using them is similar as using any other .qmd documents explained above. Once they are opened in RStudio, the Present button from the Presentation tab can be used to open the presentation in the local browser - that can be presented from there.
Use Intro-to-Week9.qmd.
Use Intro-to-Week10.qmd.
Use Intro-to-Week11.qmd.
Use Intro-to-Week12.qmd.
Use exam-guidelines.qmd.
-
Feel free to use/replicate the code.
-
Suggestions welcome.
Kind regards.
Usman Afzali, PhD

