π Scenario
You conducted a short survey with 6 statements. Three items measure everyday stress, and 3 items measure recovery behavior. Some items are negatively worded and need to be reverse-scored.
The scale ranges from 1 (strongly disagree) to 8 (strongly agree).
The items
π§ Stress:
- I often feel rushed.
- I have too little time for myself.
- I cope well with stress. (reverse-scored)
πΏ Recovery:
- I consciously take breaks.
- I find it difficult to switch off. (reverse-scored)
- I regularly do things that are good for me.
Task
- Import the file
stress_erholung.csv. - Recode items 3 and 5 using the formula
9 - x(this mirrors 1 β 8). - Calculate the two scale means:
stress_scorefrom items 1, 2,item3_rekerholung_scorefrom items 4,item5_rek, 6
(Tip: Pay attention to missing values β they should be ignored!)
- Calculate a new variable
differenz_score, that is,stress_score - erholung_score
β Positive values mean: more stress than recovery. - Check whether the values look plausible.
π‘ Solution in R
I recorded a short video for you here.
Here is the solution as R code:
# 1. Import
data <- read.csv("stress_erholung.csv")
# 2. Recode the reverse-coded items
data$item3_rek <- 9 - data$item3
data$item5_rek <- 9 - data$item5
# 3. Calculate scale means (with NA handling)
data$stress_score <- rowMeans(data[, c("item1", "item2", "item3_rek")], na.rm = TRUE)
data$erholung_score <- rowMeans(data[, c("item4", "item5_rek", "item6")], na.rm = TRUE)
# 4. Calculate the difference variable
data$differenz_score <- data$stress_score - data$erholung_score
# 5. Check
head(data)
π‘ Solution in SPSS (step by step)
Here is the solution using the PSPP replica of SPSS.
1. Import
- File β Open Data β Text File β
stress_erholung.csv - Delimiter: Comma β Next β Finish
2. Recode items 3 and 5 using 9 - x
- Menu: Transform β Compute Variable
- New variable:
item3_rek- Formula:
9 - item3
- Formula:
- Repeat:
item5_rek = 9 - item5
3. Calculate the scale means
- Menu: Transform β Compute Variable
- New variable:
stress_score- Formula:
MEAN.3(item1, item2, item3_rek)
- Formula:
- New variable:
erholung_score- Formula:
MEAN.3(item4, item5_rek, item6)(The.3means: βat least 3 valid values are requiredβ; you can also chooseMEAN.2())
- Formula:
4. Calculate the difference
- Transform β Compute Variable
- New variable:
differenz_score- Formula:
stress_score - erholung_score
- Formula:
5. Check the result
- Data Editor β display new variables
- Menu: Analyze β Descriptive Statistics β Frequencies or Means
