knitr::opts_chunk$set(echo = TRUE)

There are two sets of functions for each complex-span task:

The raw_ functions will create a tidy raw data file for the task with relevant columns for you to calculate task scores and other performance measures on the task.

The score_ functions will create a scored data file for the task from the output provided by the raw_ functions. To allow for greater flexibility (see Calculating reliability below), the score_ functions will need to be used with dplyr::group_by().

raw_ functions

data_raw <- raw_symspan(data_import)

Both trial and subtrial level variables are provided by the raw_ functions.

A trial consists of the completion of alternating processing subtasks (e.g., symmetry judgments) and the presentation of memory items followed by a recall of the memory items.

Subtrial level performance includes the accuracy and reaction time for each individual processing subtask and the accuracy for each individual recalled memory item within a single trial.

Trial level performance includes a sum of the number of processing subtasks answered correctly on that trial and the the sum of memory items correctly recalled in their serial order. In addition, there are additional trial level scores (e.g., Partial.unit) provided to make it easier to use alternative scoring methods for the complex-span tasks. For more details on each of the scoring methods see Conway et al. (2005)

Columns outputted by raw_ functions

score_ functions

Based on the output provided by the raw_ functions, the score_ functions will calculate task level scores on both the processing task and the memory task. In order to allow for more flexibility with using the score_ functions, they will need to be combined with dplyr::group_by().

library(englelab)
library(dplyr)
library(tidyr)

data_raw <- raw_symspan(data_import)

data_scores <- data_raw %>%
  group_by(Subject) %>%
  score_symspan()

## Alternatively, to get block level performance
data_scores <- data_raw %>%
  group_by(Subject, Block) %>%
  score_symspan() %>%
  pivot_wider(id_cols = "Subject",
              names_from = "Block",
              names_prefix = "Block",
              values_from = contains("SymSpan"))

Columns outputted by score_ functions

For more details on how each score is calculated see Conway et al. (2005) and Gonthier (2022)

We advise using the PartialScore or EditDistanceScore as these tend to have the highest reliability. If you use the Edit Distance scores, then please cite Gontier (2022).

Calculate Reliability

Any time you use a measure of individual differences it is critical to provide reliability estimates from your sample. Here is a demonstration of how to do so with the complex-span tasks.

Reliability estimates should be calculated based on the trial level data that was used to calculated an aggregated score for the task. For instance, if you calculated complex-span scores using the the partial-credit load scoring method then you should calculate reliability based on the Partial.load scores in the raw data.

Split-Half

library(englelab)
library(dplyr)
library(tidyr)

splithalf <- data_raw %>%
  group_by(Subject) %>%
  mutate(Split = ifelse(Trial %% 2, "odd", "even")) %>%
  group_by(Subject, Split) %>%
  score_symspan() %>%
  pivot_wider(id_cols = "Subject",
              names_from = "Split",
              values_from = contains("SymSpan")) %>%
  summarise(r = cor(SymSpan.PartialScore_odd, SymSpan.PartialScore_even)) %>%
  mutate(r = (2 * r) / (1 + r))

Cronbach's Alpha

library(dplyr)
library(tidyr)
library(psych) # alpha()

cronbachalpha <- data_raw %>%
  distinct(Subject, Trial, .keep_all = TRUE) %>%
  pivot_wider(id_cols = "Subject",
              names_from = "Trial",
              values_from = contains("Partial.load")) %>%
  alpha()

## The cronbach alpha value can then be accessed: 
cronbachalpha$total$std.alpha

References

Conway, A. R. A., Kane, M. J., Bunting, M. F., Hambrick, Z. D., Wilhelm, O., & Engle, R. W. (2005). Working memory span tasks: A methodological review and user’s guide. Psychonomic Bulletin & Review, 12(5), 769–786.

Gonthier, C. (2022). An easy way to improve scoring of memory span tasks: The edit distance, beyond “correct recall in the correct serial position.” Behavior Research Methods, 16. https://doi.org/10.3758/s13428-022-01908-2



EngleLab/englelab documentation built on Sept. 9, 2024, 4:12 a.m.