-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexperiment.html
More file actions
667 lines (591 loc) · 28.2 KB
/
experiment.html
File metadata and controls
667 lines (591 loc) · 28.2 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
<!DOCTYPE html>
<html>
<head>
<title>Psych Experiment</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="jspsych/jspsych.js"></script>
<script src="jspsych/plugin-html-slider-response.js"></script>
<script src="jspsych/plugin-html-keyboard-response.js"></script>
<script src="jspsych/plugin-fullscreen.js" type="text/javascript"></script>
<script src="jspsych/plugin-external-html.js" type="text/javascript"></script>
<script src="jspsych/plugin-instructions.js" type="text/javascript"></script>
<script src="jspsych/plugin-survey-text.js" type="text/javascript"></script>
<script src="jspsych/plugin-survey-likert.js" type="text/javascript"></script>
<script src="jspsych/plugin-survey.js" type="text/javascript"></script>
<script src="experiment.js" type="text/javascript"></script>
<link href="jspsych/jspsych.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="https://unpkg.com/@jspsych/plugin-survey@0.2.1/css/survey.css">
<link href="experiment.css" rel="stylesheet" type="text/css">
</head>
<body></body>
<script>
// initialize experiment
var jsPsych = initJsPsych({
on_finish: finish_experiment,
show_progress_bar: true,
auto_update_progress_bar: false
});
/*
grabs all variables from the url
url variables are specified as follows:
Ex: experiment.html?subject=s001&day=1
subject_id = 's001'
session_id = '1'
*/
// capture info from Prolific
var subject_id = jsPsych.data.getURLVariable('PROLIFIC_PID');
var study_id = jsPsych.data.getURLVariable('STUDY_ID');
var session_id = jsPsych.data.getURLVariable('SESSION_ID');
// recode the complicated study_id variable into a simply "day" variable
var day = [];
if(study_id == '6480ca21f249c477384ec9f1'){
day = '1';
} else {
day = '2';
}
jsPsych.data.addProperties({
subject_id: subject_id,
study_id: study_id,
session_id: session_id
});
// total number of events in the experiment. Used to properly gage the progress bar at the top of the screen
if(day == '1'){
nEvents = 120;
} else {
nEvents = 121;
}
// global variables -- available to all functions
/*
encoding randomization
myarray = an array from 1-28.
randperm = a random permutation of the 1-28 array.
personCatch = a array of length 2 randomly selecting two person trials to serve as catch trials
placeCatch = an array of length 2 randomly select two place trials to serve as catch trials
*/
var myarray = Array.from({ length: 28 }, (x, i) => i);
var randperm = jsPsych.randomization.sampleWithoutReplacement(myarray, 28);
var personCatch = Array.from({ length: 14 }, (x, i) => i);
personCatch = jsPsych.randomization.sampleWithoutReplacement(personCatch, 2);
var placeCatch = Array.from({ length: 14 }, (x, i) => i);
placeCatch = jsPsych.randomization.sampleWithoutReplacement(placeCatch, 2);
// allKeySim = a list containing all of the people and places selected by the
// participant
var allKeyStim = [];
/*
c,cc = counter variables that keep track of the current encoding (c) or
retrieval (cc) trial we are currently on. Start at -1 since javascript
indexs lists starting from 0
*/
var c = -1;
var cc = -1;
var place_count = -1;
var person_count = -1;
//
var enc_trial_data = [];
var ret_trials = [];
// timeline = an array that contains all of the elements of our experiment in the
// order that they are to be experienced. See jsPsych tutorials.
var timeline = [];
// Welcome Message, differs based on session
if (day == '1') {
var msg = "Welcome to Part 1 of our experiment. Press any key to begin.";
} else {
var msg = "Welcome to Part 2 of our experiemnt. Press any key to begin."
}
var welcome = {
type: jsPsychHtmlKeyboardResponse,
stimulus: msg,
data: { phase: 'welcome_screen' },
on_finish: updateProgressBar
};
// Consent Form
var consent = {
type: jsPsychExternalHtml,
url: "consents/formconsent_emoneutral_irbOnlineStudies23_stu.html",
cont_btn: "agree",
data: { phase: 'consent' },
on_finish: updateProgressBar,
css_classes: ['consent_form']
};
// Demographics Questionnaire
var page1 = [
{type: 'text', prompt: 'Age', name: 'age'},
{type: 'drop-down', prompt: 'Sex', name: 'sex', options: ['Female', 'Male', 'Intersex', 'Prefer not to reply', 'Not Listed'] },
{type: 'drop-down', prompt: 'Gender/Gender Identity: How do you identify?', name: 'gender', options: ['Woman', 'Man', 'Transgender/Tans woman', 'Transgender/Trans man', 'Non-Binary', 'Prefer not to reply', 'Not Listed'] },
{type: 'drop-down', prompt: 'Ethnicity', name: 'ethnicity', options: ['Hispanic or Latinx', 'Not Hispanic or Latinx'] }
];
var page2 = [
{type: 'multi-select', prompt: 'Race (select all that apply)', name: 'race', options: ['American Indian or Alaska Native', 'Asian', 'Black or African American', 'Native Hawaiian or other Pacific Islander', 'White', 'Other']},
{type: 'drop-down', prompt: 'Years of Education', name: 'education', options: ['fewer than 12', '12 completed high school', '13', '14', '16 (completed college)', '17', '18', '19', '20', '21', '22 or more'] },
{type: 'drop-down', prompt: 'At which age did you learn English', name: 'learn_english', options: ['Before age 6', 'Between ages 6 and 12', 'After age 12', 'Other'] },
{type: 'drop-down', prompt: 'Handedness', name: 'handedness', options: ['Left', 'Right', 'Ambidextrous'] }
];
var page3 = [
{type: 'drop-down', prompt: 'Do you experience sight problems not correct by glasses or contact lenses?', name: 'sight_problems', options: ['Yes', 'No'] },
{type: 'drop-down', prompt: 'Are you color blind?', name: 'color_blind', options: ['Yes', 'No'] },
{type: 'drop-down', prompt: 'Do you experience any difficulties with hearing that will interfere with your ability to hear audio as part of this study?', name: 'audio', options: ['Yes', 'No'] },
{type: 'text', prompt: 'How many hours of sleep did you get last night?', name: 'sleep' },
{type: 'likert', prompt: 'How much stress are you currently experiencing?', name: 'stress', likert_scale_min_label: 'much less stress than usual', likert_scale_max_label: 'much more stress than usual'}
];
var demographics = {
type: jsPsychSurvey,
pages: [page1, page2, page3],
show_question_numbers: 'on',
title: 'Demographic Information Questionnaire',
data: { phase: 'demographics' },
on_finish: updateProgressBar,
save_trial_parameters: {accuracy: false}
};
// Force Fullscreen
var fullscreen_up = {
type: jsPsychFullscreen,
fullscreen_mode: true,
data: { phase: 'fullscreen_up' },
on_finish: updateProgressBar
}
// Instructions
var enc_instuct = SetInstr();
// End Full Screen
var fullscreen_down = {
type: jsPsychFullscreen,
fullscreen_mode: false,
data: { phase: 'fullscreen_down' },
on_finish: updateProgressBar
}
/*
topPeople = list containing participant's top 14 most familiar famous
people
topPlaces = list containing participant's top 14 most familar famous
places
*/
var topPeople = [];
var topPlaces = [];
// d3 is a part of the D3.js JavasScript library. Used here to read in a csv files
// from the disk
d3.csv("experiment_data.csv").then(async function (data) {
// add welcome, fullscreen_up, consent, and demographics routines
timeline.push(welcome);
timeline.push(fullscreen_up);
// only collect consent, demographics on day 1
if (day == '1') {
timeline.push(consent);
timeline.push(demographics);
}
// select only the data from the correct session
var sesData = data.filter(function (el) { return el.day == day })
// people stimuli
var people = sesData.filter(removeBlank).map(x => pick(x, 'people'))
people = people.map(obj => ({ ...obj, prompt: obj.people, name: obj.people }))
people = people.map(obj => omit(obj, 'people'))
// places stimuli
var places = sesData.filter(removeBlank).map(x => pick(x, 'place'))
places = places.map(obj => ({ ...obj, prompt: obj.place, name: obj.place }))
places = places.map(obj => omit(obj, 'place'))
// survey subjects about their level of familiarity with these stimuli
var stimsurvey = {
type: jsPsychSurvey,
title: "How familiar are you with the following...",
pages: [
[{type: 'likert-table', required: true, statements: people, prompt: '...individuals?', options: ['1 - Unfamiliar','2','3','4','5 - Very Familiar'], randomize_statement_order: true, name: 'people'}],
[{type: 'likert-table', required: true, statements: places, prompt: '...places?', options: ['1 - Unfamiliar','2','3','4','5 - Very Familiar'], randomize_statement_order: true, name: 'places'}]
],
data: { phase: 'stim_ratings' },
on_finish: function () {
calculate_top();
updateProgressBar();
},
save_trial_parameters: {accuracy: false}
};
timeline.push(stimsurvey)
timeline.push(enc_instuct)
// encoding
var enc_trial = {
type: jsPsychHtmlKeyboardResponse,
stimulus: construct_encoding_stimulus,
choices: "NO_KEYS",
trial_duration: 12000,
stimulus_duration: 12000,
response_ends_trial: false,
post_trial_gap: 1000,
data: {
phase: 'enc',
objOne: jsPsych.timelineVariable('first'),
objTwo: jsPsych.timelineVariable('second'),
key: function () {
return allKeyStim[randperm[c]]
},
encTrialNum: function () {
return c
},
condition: function(){
var peopleArray = people.map(obj => obj.prompt);
var placesArray = places.map(obj => obj.prompt);
var curKey = allKeyStim[randperm[c]]
var condition
if(peopleArray.includes(curKey)){
condition = 'famous person'
} else {
if(placesArray.includes(curKey)){
condition = 'famous place'
} else{
condition = null;
}
}
return condition
}
},
};
var success_rating = {
type: jsPsychHtmlSliderResponse,
stimulus: '<p>How successful were you in imagining a scenario?</p>',
require_movement: true,
post_trial_gap: 500,
on_finish: updateProgressBar,
labels: ['Unsuccessful', 'Successful'],
data: {
phase: 'enc',
encTrialNum: function () {
return c
}
},
save_trial_parameters: {slider_start: false}
};
var free_text_response = {
type: jsPsychSurveyText,
questions: [
{ prompt: 'Please describe what you were imagining:', rows: 5, required: true }
],
data: {
phase: 'enc',
encTrialNum: function () {
return c
}
}
}
var if_node = {
timeline: [free_text_response],
conditional_function: function () {
// advance the place and person counters
var place_stim = sesData.map(x => x.place)
var current_key = allKeyStim[randperm[c]]
if (place_stim.includes(current_key)) {
// advance the place counter
place_count = ++place_count;
return placeCatch.includes(place_count)
} else {
// advance the person counter
person_count = ++person_count;
return personCatch.includes(person_count)
}
}
}
var objects = sesData.map(x => pick(x, 'first', 'second'))
var enc_trial_procedure = {
timeline: [enc_trial, success_rating, if_node],
timeline_variables: objects,
randomize_order: true,
repetitions: 1,
on_timeline_finish: set_up_retrieval,
}
timeline.push(enc_trial_procedure)
var enc_bds_BufferScreen = {
type: jsPsychInstructions,
pages: [
"<p>Finished with encoding. Next task is the backwards digit span task.</p>",
'<p>In this task, you will be presented with a series of digits one at a time.</p>',
'<p>You will then be presented with a blank answer text box.</p>',
'<p>Your goal is to type out the digits you saw in the reverse order in which you saw them.</p>',
'<p>So for example, if you were shown the digits "1 - 1 - 5 - 7 - 9", you will need to report back "9 7 5 1 1".</p>',
'<p>This task is designed to be difficult. You are not expected to be able to answer all of the questions correctly.</p>',
'<p>Your performance on this task will not affect your compensation. Try your best.</p>',
'<p>If you need to take a break, please take a break now before beginning the next task.</p>',
'<p>Click next to begin.</p>'
],
data: { phase: 'instr' },
css_classes: ['consent_form'],
show_clickable_nav: true,
post_trial_gap: 1500,
on_finish: updateProgressBar
};
timeline.push(enc_bds_BufferScreen)
var bds = await backwards_digit_span();
timeline.push(bds)
var bds_ret_BufferScreen = {
type: jsPsychInstructions,
pages: [
"Finished with backwards digit span task. Next task is the memory test.",
'<p>During the memory test, you will be presented with one of the words presented previously along with two blank boxes.</p>',
'<p>Your task is to remember the items that were presented alongside the keyword in the previous portion of the experiment.<\p>',
'<p>You will click the "continue" button at the bottom of the page when you want to submit your answers.<\p>',
'<p>If you need to take a break, please take a break now before beginning the next task.</p>',
'<p>Click next when you are ready to begin.</p>'
],
data: { phase: 'instr' },
show_clickable_nav: true,
css_classes: ['consent_form'],
on_finish: updateProgressBar
};
timeline.push(bds_ret_BufferScreen)
// retrieval
var ret_trial = {
type: jsPsychSurveyText,
questions: [
{
prompt: function () {
cc = ++cc;
return "What items went with <b>" + ret_trials[cc].key + "</b> ?"
},
rows: 2,
required: false
},
{
prompt: '',
rows: 2,
require: false
}
],
post_trial_gap: 500,
on_finish: updateProgressBar,
data: function () {
ret_trials[cc].phase = 'ret'
return ret_trials[cc]
}
}
var ret_trial_procedure = {
timeline: [ret_trial],
randomize_order: false,
repetitions: 72
}
timeline.push(ret_trial_procedure)
// Survey of Autobiographical Memory
var sam_labels = [
'1 Strongly disagree',
'2 Disagree somewhat',
'3 Neither agree nor disagree',
'4 Agree somewhat',
'5 Agree strongly'
];
var sam_statements = [
// semantic
{prompt: 'I can learn and repeat facts easily, even if I don’t remember where I learned them', name: 'semantic_1'},
{prompt: 'After I have read a novel or newspaper, I forget the facts after a few days', name: 'semantic_2'},
{prompt: 'After I have met someone once, I easily remember his or her name', name: 'semantic_3'},
{prompt: 'I can easily remember the names of famous people (sports figures, politicians, celebrities)', name: 'semantic_4'},
{prompt: 'I have a hard time remembering information I have learned at school or work', name: 'semantic_5'},
{prompt: 'I am very good at remembering information about people that I know (e.g., the names of a co-worker’s children, their personalities, places friends have visited etc.)', name: 'semantic_6'},
// spatial
{prompt: 'In general, my ability to navigate is better than most of my family/friends', name: 'spatial_1'},
{prompt: 'After I have visited an area, it is easy for me to find my way around the second time I visit', name: 'spatial_2'},
{prompt: 'I have a hard time judging the distance (e.g., in meters or kilometers) between familiar landmarks', name: 'spatial_3'},
{prompt: 'I get lost easily, even in familiar areas', name: 'spatial_4'},
{prompt: 'If my route to work or school was blocked, I could easily find the next fastest way to get there', name: 'spatial_5'},
{prompt: 'I use specific landmarks for navigating', name: 'spatial_6'},
// future
{prompt: 'When I imagine an event in the future, the event generates vivid mental images that are specific in time and place', name: 'future_1'},
{prompt: 'When I imagine an event in the future, I can picture the spatial layout', name: 'future_2'},
{prompt: 'When I imagine an event in the future, I can picture people and what they look like', name: 'future_3'},
{prompt: 'When I imagine an event in the future, I can imagine how I may feel', name: 'future_4'},
{prompt: 'When I imagine an event in the future, I can picture images (e.g., people, objects, etc)', name: 'future_5'},
{prompt: 'I have a difficult time imagining specific events in the future', name: 'future_6'},
// episodic
{prompt: 'Specific events are difficult for me to recall', name: 'episodic_1'},
{prompt: 'When I remember events, I have a hard time determining the order of details in the event', name: 'episodic_2'},
{prompt: 'When I remember events, in general I can recall objects that were in the environment', name: 'episodic_3'},
{prompt: 'When I remember events, in general I can recall what I was wearing', name: 'episodic_4'},
{prompt: 'I am highly confident in my ability to remember past events', name: 'episodic_5'},
{prompt: 'When I remember events, I remember a lot of details', name: 'episodic_6'},
{prompt: 'When I remember events, in general I can recall which day of the week it was', name: 'episodic_7'},
{prompt: 'When I remember events, in general I can recall people, what they looked like, or what they were wearing', name: 'episodic_8'}
]
var sam_page = [
{
type: 'likert-table',
required: false,
statements: sam_statements,
prompt: 'Please indicate the strength of your agreement with each of the following statements.',
options: sam_labels,
randomize_statement_order: true,
name: 'sam'
}
]
var sam = {
type: jsPsychSurvey,
pages: [sam_page],
title: 'Survey of Autobiographical Memory',
data: { phase: 'sam' },
on_finish: updateProgressBar,
save_trial_parameters: {accuracy: false}
};
if (day == '2') {
timeline.push(sam);
}
/*
Interpersonal Reactivity Index
*/
var iri_options = [
'A: Does Not Describe Me Well',
'B',
'C',
'D',
'E: Describes Me Very Well'
];
var iri_statements = [
// first
{prompt: 'I daydream and fantasize, with some regularity, about things that might happen to me.', name: 'iri_01'},
{prompt: 'I often have tender, concerned feelings for people less fortunate than me.', name: 'iri_02'},
{prompt: "I sometimes find it difficult to see things from the 'other guy's' point of view.", name: 'iri_03'},
{prompt: "Sometimes I don't feel very sorry for other people when they are having problems.", name: 'iri_04'},
{prompt: 'I really get involved with the feelings of the characters in a novel.', name: 'iri_05'},
{prompt: 'In emergency situations, I feel apprehensive and ill-at-ease.', name: 'iri_06'},
{prompt: "I am usually objective when I watch a movie or play, and I don't often get completely caught up in it.", name: 'iri_07'},
// second
{prompt: "I try to look at everybody's side of a disagreement before I make a decision.", name: 'iri_08'},
{prompt: 'When I see someone being taken advantage of, I feel kind of protective towards them.', name: 'iri_09'},
{prompt: 'I sometimes feel helpless when I am in the middle of a very emotional situation.', name: 'iri_10'},
{prompt: 'I sometimes try to understand my friends better by imagining how things look from their perspective.', name: 'iri_11'},
{prompt: 'Becoming extremely involved in a good book or movie is somewhat rare for me.', name: 'iri_12'},
{prompt: 'When I see someone get hurt, I tend to remain calm.', name: 'iri_13'},
{prompt: "Other people's misfortunes do not usually disturb me a great deal.", name: 'iri_14'},
// third
{prompt: "If I'm sure I'm right about something, I don't waste much time listening to other people's arguments.", name: 'iri_15'},
{prompt: 'After seeing a play or movie, I have felt as though I were one of the characters.', name: 'iri_16'},
{prompt: 'Being in a tense emotional situation scares me.', name: 'iri_17'},
{prompt: "When I see someone being treated unfairly, I sometimes don't feel very much pity for them.", name: 'iri_18'},
{prompt: "I am usually pretty effective in dealing with emergencies.", name: 'iri_19'},
{prompt: "I am often quite touched by things that I see happen.", name: 'iri_20'},
{prompt: "I believe that there are two sides to every question and try to look at them both.", name: 'iri_21'},
// fourth
{prompt: 'I would describe myself as a pretty soft-hearted person.', name: 'iri_22'},
{prompt: 'When I watch a good movie, I can very easily put myself in the place of a leading character.', name: 'iri_23'},
{prompt: 'I tend to lose control during emergencies.', name: 'iri_24'},
{prompt: "When I'm upset at someone, I usually try to 'put myself in his shoes' for a while.", name: 'iri_25'},
{prompt: 'When I am reading an interesting story or novel, I imagine how I would feel if the events in the story were happening to me.', name: 'iri_26'},
{prompt: 'When I see someone who badly needs help in an emergency, I go to pieces.', name: 'iri_27'},
{prompt: 'Before criticizing somebody, I try to imagine how I would feel if I were in their place.', name: 'iri_28'}
]
var iri_page = [
{
type: 'likert-table',
required: false,
statements: iri_statements,
prompt: 'The following statements inquire about your thoughts and feelings in a variety of situations. For each item, indicate how well it describes you by choosing the appropriate letter on the scale.',
options: iri_options,
randomize_statement_order: true,
name: 'iri'
}
]
var iri = {
type: jsPsychSurvey,
pages: [iri_page],
title: 'Interpersonal Reactivity Index',
data: { phase: 'iri' },
on_finish: updateProgressBar,
save_trial_parameters: {accuracy: false}
};
if (day == '2') {
timeline.push(iri);
}
/*
Vividness of Visual Imagery Questionnaire
*/
var vviq_options = ['1 No image at all, you only “know” that you are thinking of the object',
'2 Vague and dim',
'3 Moderately clear and lively',
'4 Clear and reasonably vivid',
'5 Perfectly clear and vivid as real seeing'];
var vviq_page = [
{
type: 'html',
prompt: 'For each item on this questionnaire, try to form a mental image, and consider your experience carefully. For any image that you do experience, rate how vivid it is using the five-point scale described below. If you do not have a visual image, rate vividness as ‘1’. Only use ‘5’ for images that are truly as lively and vivid as real seeing. Please note that there are no right or wrong answers to the questions, and that it is not necessarily desirable to experience imagery or, if you do, to have more vivid imagery.'
},
{
type: 'likert-table',
required: false,
statements: [
{prompt: 'The exact contour of face, head, shoulders and body.', name: '01'},
{prompt: 'Characteristic poses of head, attitudes of body etc.', name: '02'},
{prompt: "The precise carriage, length of step etc., in walking.", name: '03'},
{prompt: "The different colors worn in some familiar clothes.", name: '04'}
],
prompt: 'Think of some relative or friend whom you frequently see (but who is not with you at present) and consider carefully the picture that comes before your mind’s eye.',
options: vviq_options,
randomize_statement_order: true,
name: 'vviq_relative'
},
{
type: 'likert-table',
required: false,
statements: [
{prompt: 'The sun rising above the horizon into a hazy sky.', name: '01'},
{prompt: 'The sky clears and surrounds the sun with blueness.', name: '02'},
{prompt: "Clouds. A storm blows up with flashes of lightning.", name: '03'},
{prompt: "A rainbow appears.", name: '04'}
],
prompt: 'Visualize a rising sun. Consider carefully the picture that comes before your mind’s eye.',
options: vviq_options,
randomize_statement_order: true,
name: 'vviq_sun'
},
{
type: 'likert-table',
required: false,
statements: [
{prompt: 'The overall appearance of the shop from the opposite side of the road.', name: '01'},
{prompt: 'A window display including colors, shapes and details of individual items for sale.', name: '02'},
{prompt: "You are near the entrance. The color, shape and details of the door.", name: '03'},
{prompt: "You enter the shop and go to the counter. The counter assistant serves you. Money changes hands.", name: '04'}
],
prompt: 'Think of the front of a shop which you often go to. Consider the picture that comes before your mind’s eye.',
options: vviq_options,
randomize_statement_order: true,
name: 'vviq_shop'
},
{
type: 'likert-table',
required: false,
statements: [
{prompt: 'The contours of the landscape.', name: '01'},
{prompt: 'The color and shape of the trees.', name: '02'},
{prompt: "The color and shape of the lake.", name: '03'},
{prompt: "A strong wind blows on the trees and on the lake causing waves in the water.", name: '04'}
],
prompt: 'Finally, think of a country scene which involves trees, mountains and a lake. Consider the picture that comes before your mind’s eye.',
options: vviq_options,
randomize_statement_order: true,
name: 'vviq_country'
},
]
var vviq = {
type: jsPsychSurvey,
pages: [vviq_page],
title: 'Vivdness of Visual Imagery Questionnaire',
data: { phase: 'vviq' },
on_finish: updateProgressBar,
save_trial_parameters: {accuracy: false}
};
if (day == '2') {
timeline.push(vviq);
}
/*
Debriefing Questionnaire
*/
var debrief_questionnaire = {
type: jsPsychSurvey,
pages: [[
{type: 'html', prompt: 'Please complete the following short questionnaire. Your answers to these questions will be kept confidential. They will not affect your pay.'},
{type: 'likert', prompt: 'How distracted were you during the experiment?', likert_scale_max_label: 'Very Distracted', likert_scale_min_label: 'Not Very', name: 'distrationLevel'},
{type: 'likert', prompt: 'How much were you paying attention during the experiemnt?', likert_scale_max_label: 'Very Much', likert_scale_min_label: 'Not Much', name: 'attentionLevel'},
{type: 'likert', prompt: 'How well do you feel that you did on the experiment?', likert_scale_max_label: 'Very Well', likert_scale_min_label: 'Not Very Well', name: 'performanceLevel'}
]],
title: 'Debriefing',
data: { phase: 'debrief' },
on_finish: updateProgressBar,
save_trial_parameters: {accuracy: false}
};
timeline.push(debrief_questionnaire);
timeline.push(fullscreen_down);
jsPsych.run(timeline);
});
</script>
</html>