psychTestR enables psychologists to chain together multiple psychology tests and questionnaires in one battery, allowing for data from several tests to be stored together in one place.

This vignette will show a quick example of how you can include several psychTestR tests together alongside the SAA.

First we install some tests. These tests were the ones used in Experiment 1 of our paper.

tests <- c(
    'pmcharrison/piat',
    'sebsilas/SAA',
    'pmcharrison/piat',
    'pmcharrison/mdt',
    'pmcharrison/mpt',
    'klausfrieler/JAJ',
    'fmhoeger/psyquest'
)

devtools::install_github(tests)

If they all installed correctly, we can proceed to put the tests together in a single timeline:

# Import the test libraries
library(psychTestR)
library(SAA)
library(PDT)
library(piat)
library(mdt)
library(mpt)
library(JAJ)
library(psyquest)

# For now, we need to do this:
library(psychTestRCAT) # call this after SAA for now

# A global password for all tests
password <- "demo"


timeline <- join(

  SAA(app_name = "my_research_project"),
  # The SAA num_items defaults are the same as used in the experiment: 6 long notes, 10 arrhythmic and 10 rhythmic melodies
  # By default, the SAA deploys the Goldsmiths Musical Sophistication Index Musical Training and Singing Abilities subscales

   # The code to do this manually (commented out) is:
  # GMS(admin_password = password, subscales = c("Musical Training", "Singing Abilities")),

  # Pitch Discrimination Task
  PDT(label = "PDCT", num_items = 15L),

  # Pitch Imagery Arrow Task
  piat(label = "PIAT", num_items = 15L),

  # Melodic Discrimination Test
  mdt(label = "MDT", num_items = 11L),

  # Mistuning Perception Test
  mpt(label = "MPT", num_items = 15L),

  # Jack and Jill Working Memory Test
  JAJ(label = "JAJ", num_items = 8L),

  # Make sure results are saved to disk
  elt_save_results_to_disk(complete = TRUE),

  # A "final_page" is required at the end of a psychTestR timeline
  final_page("You have completed the study!")
)


make_test(
  elts = timeline,
  opt = test_options(title = "Melody Singing Battery", admin_password = password))