W7 Exercises: Questionnaire Data & Scale Scores

Dataset: boxbreathe.csv

Researchers are interested in different methods for reducing stress. They recruit 522 participants. All participants first filled out a 6-question measure of stress that is aimed to capture feelings of immediate stress and panic. All questions were scored on a 5-point likert scale from “Strongly Disagree” (1) to “Strongly Agree” (5). To obtain an overall measure of stress, participants’ scores on the 6 questions are added together.

After completing the initial stress measure, participants then completed one of three 5 minute tasks. One third of participants sat in silence for 5 minutes, one third played a picture-matching game on their phone for 5 minutes, and the remaining third completed 5 minutes of “box breathing” (inhale for 6, hold for 4, exhale for 6, hold for 4). After the 5 minutes, all participants filled out the same 6-item measure of stress.

Researchers would like to know whether the different tasks are associated with differences in reduction in stress.

Dataset: https://uoepsy.github.io/data/boxbreathe.csv

variable description
t1_q1 (Time1) I feel a bit on edge right now.
t1_q2 (Time1) I find it hard to focus because of how I'm feeling.
t1_q3 (Time1) I feel like things are getting a little out of control.
t1_q4 (Time1) I feel calm and steady in this moment.
t1_q5 (Time1) I feel capable of managing the situation right now.
t1_q6 (Time1) I feel somewhat restless or unsettled at the moment.
task Task completed (nothing / game / boxbreathing)
t2_q1 (Time2) I feel a bit on edge right now.
t2_q2 (Time2) I find it hard to focus because of how I'm feeling.
t2_q3 (Time2) I feel like things are getting a little out of control.
t2_q4 (Time2) I feel calm and steady in this moment.
t2_q5 (Time2) I feel capable of managing the situation right now.
t2_q6 (Time2) I feel somewhat restless or unsettled at the moment.
Question 1

Read in the data and have a look at it.

  • What does each row represent?
  • What measurement(s) show us a person’s stress?

Question 2

First things first, our questionnaire software has given us the responses all in the descriptors used for each point of the likert scale, which is a bit annoying.
Convert them all to numbers, which we can then work with.

What we have What we want
Strongly Agree 5
Agree 4
Agree 4
Strongly Disagree 1
Neither Disagree nor Agree 3
Agree 4
Disagree 2

Question 3

Just looking at the data at time 1, create a correlation matrix of the various items that measure stress.
What do you notice? Does it make sense given the wording of the questions?

Question 4

Reverse score questions 4 and 5.
We’ll need to do this for both the data at time 1 and at time 2.

  • See R7#reverse-coding
  • Be careful!! if you have some code that reverse scores a question, and you run it twice, you will essentially reverse-reverse score the question, and it goes back to the original ordering!

Question 5

Take a look at the correlation of the time 1 stress measures again.
What has changed?

Question 6

We’re finally getting somewhere! Let’s create a score for “stress” at time 1, and a score for “stress” at time 2.

The description of the questionnaire says that we should take the sum of the scores on each question, to get an overall measure of stress.

The function rowSums() should help us here! See an example in R7#row-scoring

Question 7

Make a new column that represents the change in stress for each person between the two timepoints.

Question 8

Provide some descriptive statistics for the stress scores at time 1 and at time 2, and of the ‘change in stress’ measure.

The describe() function from the psych package is often pretty useful for this kind of thing

Question 9

Plot the stress-change for each group of participants.
Fit a linear model to investigate whether the different techniques (the timer game and the box-breathing) are associated with differences in stress change.