zo | zc | ze | za | zn | scs | dass |
---|---|---|---|---|---|---|
0.76 | 1.58 | -0.79 | -0.09 | 1.32 | 30 | 56 |
0.30 | -0.27 | -0.09 | 0.09 | -0.40 | 30 | 48 |
-0.13 | 0.66 | -0.80 | -0.95 | 0.93 | 35 | 48 |
1.06 | -1.02 | -0.16 | -0.50 | -0.02 | 29 | 48 |
1.74 | -0.78 | -1.55 | -2.86 | -1.14 | 41 | 43 |
0.22 | -0.41 | 0.78 | 0.90 | -0.25 | 37 | 60 |
Write Up Example & Block 2 Recap
Learning Objectives
At the end of this lab, you will:
- Understand how to write-up and provide interpretation of a linear model with multiple predictors.
What You Need
- Be up to date with lectures
- Have completed Labs 7-10
Required R Packages
Remember to load all packages within a code chunk at the start of your RMarkdown file using library()
. If you do not have a package and need to install, do so within the console using install.packages(" ")
. For further guidance on installing/updating packages, see Section C here.
For this lab, you will need to load the following package(s):
- tidyverse
- patchwork
- sjPlot
- sandwich
- interactions
Lab Data
You can download the data required for this lab here or read it in via this link https://uoepsy.github.io/data/scs_study.csv.
Note: This is the same data as Lab 8.
Section A: Write-Up
In this lab you will be presented with the output from a statistical analysis, and your job will be to write-up and present the results. We’re going to use an example analysis using one of the datasets we have worked with on a number of exercises in previous labs concerning personality traits, social comparison, depression, and anxiety.
The aim in writing should be that a reader is able to more or less replicate your analyses without referring to your R code. This requires detailing all of the steps you took in conducting the analysis.
The point of using RMarkdown is that you can pull your results directly from the code. If your analysis changes, so does your report!
Make sure that your final report doesn’t show any R functions or code. Remember you are interpreting and reporting your results in text, tables, or plots, targeting a generic reader who may use different software or may not know R at all. If you need a reminder on how to hide code, format tables, etc., make sure to review the rmd bootcamp.
Study Overview
Research Question
Controlling for other personality traits, does neuroticism moderate effects of social comparison on symptoms of depression, anxiety and stress?
Previous research has identified an association between an individual’s perception of their social rank and symptoms of depression, anxiety and stress. We are interested in the individual differences in this association.
To investigate whether the effect of social comparison on symptoms of depression, anxiety and stress varies depending on level of Neuroticism, we will need to fit a multiple regression model with an interaction term and control for other personality traits.
Setup
- Create a new RMarkdown file
- Load the required package(s)
- Read the scs dataset into R, assigning it to an object named
scs
The 3-Act Structure
We need to present our report in three clear sections - think of your sections like the 3 key parts of a play or story - we need to (1) provide some background and scene setting for the reader, (2) present our results in the context of the research question, and (3) present a resolution to our story - relate our findings back to the question we were asked and provide our answer.
Act I: Analysis Strategy
Attempt to draft a discussion section based on the above research question and analysis provided.
Act II: Results
Attempt to draft a results section based on your detailed analysis strategy and the analysis provided.
Act III: Discussion
Attempt to draft a discussion section based on your results and the analysis provided.
Section B: Weeks 6 - 11 Recap
In the second part of the lab, there is no new content - the purpose of the recap section is for you to revisit and revise the concepts you have learned over the last 4/5 weeks.
Before you expand each of the boxes below, think about how comfortable you feel with each concept.
Section C: Mock Exam Questions
In the exam, there will be 3 sections containing different types of questions, as outlined below:
- Section A: You will answer multiple choice questions (see Question 1 for an example)
- Section B: You will solve by-hand calculation problems (see Question 2 for an example)
- Section C: You will be asked questions about basic
R
-code and to interpret results of analyses (see Question 3 for an example)
Below there is a mock question from each section described above - note that solutions are not provided. These are just to give you an example of the types of questions you will be presented with. If you have questions about these, ask your tutor or come to office hours to discuss.
Which assumption is being checked in the following line of code:
residualPlots(model1)
- A: Linearity
- B: Normality
- C: Independence
- D: Equal variances / Homoscedasticity
Using the values below, calculate \(R^2\).
- SSModel = 70
- SSResidual = 56
- SSTotal = 126
Researchers have a sample of 100 people, and they have measured their resting heart rate (rhr
) and their caffeine consumption (caffeine
). They were interested in estimating how caffeine consumption was associated with differences in resting heart rate, after controlling for age (age
; since heart rate increases with advancing age and because they thought that older people tend to drink less caffeine).
From the following output (see Figure 7), write out and interpret the regression equation for the model following APA guidelines.