-
Notifications
You must be signed in to change notification settings - Fork 0
/
SAA_with_other_tests.Rmd
92 lines (63 loc) · 2.47 KB
/
SAA_with_other_tests.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
title: "Running an experiment with the SAA alongside other ability tests"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Running an experiment with the SAA alongside other ability tests}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
[`psychTestR`](https://pmcharrison.github.io/psychTestR/articles/b-introduction) 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.
```{r eval = FALSE}
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:
```{r eval = FALSE}
# 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))
```